letsencrypt_plugin 0.0.5 → 0.0.6
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/MIT-LICENSE +1 -1
- data/lib/letsencrypt_plugin/version.rb +1 -1
- data/lib/tasks/letsencrypt_plugin_tasks.rake +28 -8
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 970e5b0545fab8204c13aca8399e6807f1602ba6
|
4
|
+
data.tar.gz: 2d5439882e197c9a5d13c0b75becbcd6f0f636db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9290e25b80543791e4a271d0447e5b2b523f846b8cbc684b25be5eba7a8fd9417c0804175474d247773bcfe2142d5716a292597e79db056732e963e0171dcc6
|
7
|
+
data.tar.gz: 9b0d082740c97fb5bbe2114cb05870fa864b0372e0579a124b9e9a0d1f1baa160dfe21c2b35b1a3a404ac136f5e12b3b9df2db39fd42b9d10ac52a244f887824
|
data/MIT-LICENSE
CHANGED
@@ -57,8 +57,8 @@ task :letsencrypt_plugin => :setup_logger do
|
|
57
57
|
ch.update(:response => challenge.file_content)
|
58
58
|
end
|
59
59
|
sleep(2)
|
60
|
-
end
|
61
|
-
|
60
|
+
end
|
61
|
+
|
62
62
|
def wait_for_status(challenge)
|
63
63
|
Rails.logger.info("Waiting for challenge status...")
|
64
64
|
counter = 0
|
@@ -70,17 +70,37 @@ task :letsencrypt_plugin => :setup_logger do
|
|
70
70
|
|
71
71
|
def create_csr
|
72
72
|
Rails.logger.info("Creating CSR...")
|
73
|
-
Acme::CertificateRequest.new(names: [ CONFIG[:domain] ])
|
73
|
+
Acme::Client::CertificateRequest.new(names: [ CONFIG[:domain] ])
|
74
74
|
end
|
75
75
|
|
76
76
|
# Save the certificate and key
|
77
77
|
def save_certificate(certificate)
|
78
78
|
if !certificate.nil?
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
79
|
+
if !ENV['DYNO'].nil?
|
80
|
+
Rails.logger.info('You are running this script on Heroku, please copy-paste certificates to your local machine')
|
81
|
+
Rails.logger.info('and then follow https://devcenter.heroku.com/articles/ssl-endpoint guide:')
|
82
|
+
|
83
|
+
Rails.logger.info("====== #{CONFIG[:domain]}-cert.pem ======")
|
84
|
+
puts certificate.to_pem
|
85
|
+
|
86
|
+
Rails.logger.info("====== #{CONFIG[:domain]}-key.pem ======")
|
87
|
+
puts certificate.request.private_key.to_pem
|
88
|
+
|
89
|
+
Rails.logger.info("====== #{CONFIG[:domain]}-chain.pem ======")
|
90
|
+
puts certificate.chain_to_pem
|
91
|
+
|
92
|
+
Rails.logger.info("====== #{CONFIG[:domain]}-fullchain.pem ======")
|
93
|
+
puts certificate.fullchain_to_pem
|
94
|
+
|
95
|
+
elsif File.directory?(File.join(Rails.root, CONFIG[:output_cert_dir]))
|
96
|
+
Rails.logger.info("Saving certificates and key...")
|
97
|
+
File.write(File.join(Rails.root, CONFIG[:output_cert_dir], "#{CONFIG[:domain]}-cert.pem"), certificate.to_pem)
|
98
|
+
File.write(File.join(Rails.root, CONFIG[:output_cert_dir], "#{CONFIG[:domain]}-key.pem"), certificate.request.private_key.to_pem)
|
99
|
+
File.write(File.join(Rails.root, CONFIG[:output_cert_dir], "#{CONFIG[:domain]}-chain.pem"), certificate.chain_to_pem)
|
100
|
+
File.write(File.join(Rails.root, CONFIG[:output_cert_dir], "#{CONFIG[:domain]}-fullchain.pem"), certificate.fullchain_to_pem)
|
101
|
+
else
|
102
|
+
Rails.logger.error("Output directory: '#{File.join(Rails.root, CONFIG[:output_cert_dir])}' does not exist!")
|
103
|
+
end
|
84
104
|
end
|
85
105
|
end
|
86
106
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: letsencrypt_plugin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukasz Gromanowski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -170,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
170
170
|
version: '0'
|
171
171
|
requirements: []
|
172
172
|
rubyforge_project:
|
173
|
-
rubygems_version: 2.
|
173
|
+
rubygems_version: 2.5.1
|
174
174
|
signing_key:
|
175
175
|
specification_version: 4
|
176
176
|
summary: Let's encrypt plugin for Ruby on Rails applications
|