letsencrypt-rails-heroku 1.1.3 → 1.2.0
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/CHANGELOG.md +4 -0
- data/README.md +3 -2
- data/VERSION +1 -1
- data/letsencrypt-rails-heroku.gemspec +3 -3
- data/lib/letsencrypt-rails-heroku/letsencrypt.rb +3 -1
- data/lib/tasks/letsencrypt.rake +10 -3
- 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: c3f97585c884a70e519fdc84a79276ab7abb845e
|
4
|
+
data.tar.gz: 04ecb09cedcc720fbfb2eb87175f68165eab842f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b52c79ddaf3970f102d6c24b4baa210fb78ec162a83e44ee1cf858dbdfd5acef0498d5a0e2f8050d83442b6abecc1d34f39753bd8ef8643083138ecd4729208
|
7
|
+
data.tar.gz: c9d16e37682bfd2649b9e5a42aa587e574e31fc9aff5f6e4454bcf41092931998ebe3bd2362c7f6c37ffc2b7690483035a2b12fba462a641e04f549b6a6edade
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -73,6 +73,9 @@ which you should set.
|
|
73
73
|
* `ACME_EMAIL`: Your email address, should be valid.
|
74
74
|
* `HEROKU_TOKEN`: An API token for this app. See below
|
75
75
|
* `HEROKU_APP`: Name of Heroku app e.g. bottomless-cavern-7173
|
76
|
+
* `SSL_TYPE`: Optional: One of `sni` or `endpoint`, defaults to `sni`.
|
77
|
+
`endpoint` requires your app to have an
|
78
|
+
[SSL endpoint addon](https://elements.heroku.com/addons/ssl) configured.
|
76
79
|
|
77
80
|
The gem itself will temporarily create additional environment variables during
|
78
81
|
the challenge / validation process:
|
@@ -180,8 +183,6 @@ Your domain is still configured as a CNAME or ALIAS to `your-app.herokuapp.com`.
|
|
180
183
|
- Provide instructions for running the gem decoupled from the app it is
|
181
184
|
securing, for the paranoid.
|
182
185
|
|
183
|
-
- Support non-SNI Heroku SSL too.
|
184
|
-
|
185
186
|
## Contributing
|
186
187
|
|
187
188
|
- Check out the latest master to make sure the feature hasn't been implemented
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: letsencrypt-rails-heroku 1.
|
5
|
+
# stub: letsencrypt-rails-heroku 1.2.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "letsencrypt-rails-heroku"
|
9
|
-
s.version = "1.
|
9
|
+
s.version = "1.2.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Pixie Labs", "David Somers", "Abigail McPhillips"]
|
14
|
-
s.date = "2017-
|
14
|
+
s.date = "2017-03-03"
|
15
15
|
s.description = "This gem automatically handles creation, renewal, and applying SSL certificates from LetsEncrypt to your Heroku account."
|
16
16
|
s.email = "team@pixielabs.io"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -15,7 +15,8 @@ module Letsencrypt
|
|
15
15
|
end
|
16
16
|
|
17
17
|
class Configuration
|
18
|
-
attr_accessor :heroku_token, :heroku_app, :acme_email, :acme_domain,
|
18
|
+
attr_accessor :heroku_token, :heroku_app, :acme_email, :acme_domain,
|
19
|
+
:acme_endpoint, :ssl_type
|
19
20
|
|
20
21
|
# Not settable by user; part of the gem's behaviour.
|
21
22
|
attr_reader :acme_challenge_filename, :acme_challenge_file_content
|
@@ -26,6 +27,7 @@ module Letsencrypt
|
|
26
27
|
@acme_email = ENV["ACME_EMAIL"]
|
27
28
|
@acme_domain = ENV["ACME_DOMAIN"]
|
28
29
|
@acme_endpoint = ENV["ACME_ENDPOINT"] || 'https://acme-v01.api.letsencrypt.org/'
|
30
|
+
@ssl_type = ENV["SSL_TYPE"] || 'sni'
|
29
31
|
@acme_challenge_filename = ENV["ACME_CHALLENGE_FILENAME"]
|
30
32
|
@acme_challenge_file_content = ENV["ACME_CHALLENGE_FILE_CONTENT"]
|
31
33
|
end
|
data/lib/tasks/letsencrypt.rake
CHANGED
@@ -117,20 +117,27 @@ namespace :letsencrypt do
|
|
117
117
|
|
118
118
|
# Send certificates to Heroku via API
|
119
119
|
|
120
|
+
endpoint = case Letsencrypt.configuration.ssl_type
|
121
|
+
when 'sni'
|
122
|
+
heroku.sni_endpoint
|
123
|
+
when 'endpoint'
|
124
|
+
heroku.ssl_endpoint
|
125
|
+
end
|
126
|
+
|
120
127
|
# First check for existing certificates:
|
121
|
-
certificates =
|
128
|
+
certificates = endpoint.list(heroku_app)
|
122
129
|
|
123
130
|
begin
|
124
131
|
if certificates.any?
|
125
132
|
print "Updating existing certificate #{certificates[0]['name']}..."
|
126
|
-
|
133
|
+
endpoint.update(heroku_app, certificates[0]['name'], {
|
127
134
|
certificate_chain: certificate.fullchain_to_pem,
|
128
135
|
private_key: certificate.request.private_key.to_pem
|
129
136
|
})
|
130
137
|
puts "Done!"
|
131
138
|
else
|
132
139
|
print "Adding new certificate..."
|
133
|
-
|
140
|
+
endpoint.create(heroku_app, {
|
134
141
|
certificate_chain: certificate.fullchain_to_pem,
|
135
142
|
private_key: certificate.request.private_key.to_pem
|
136
143
|
})
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: letsencrypt-rails-heroku
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pixie Labs
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-03-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: acme-client
|