letsencrypt_webfaction 2.2.1 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.rubocop.yml +10 -1
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -1
- data/README.md +3 -3
- data/config.defaults.yml +0 -1
- data/config.example.yml +1 -3
- data/letsencrypt_webfaction.gemspec +1 -1
- data/lib/letsencrypt_webfaction.rb +1 -1
- data/lib/letsencrypt_webfaction/args_parser.rb +2 -3
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70cdf0bbd92fee6c754762d779ad9637d851fb6d
|
4
|
+
data.tar.gz: 500669496025c30fdfe9d6e61071d1bbce4559c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd47d7ec3b7158705d045ee282985d50687a1338ee068a696814327cb95e545481a9700fb6b82dee0a98c21608ddbf4c8caf88b2c260ab67e93a8f24604c4afd
|
7
|
+
data.tar.gz: 5ea1ca661317976e585fc974d732225c15b2b359495065e5772b6125a6dcea7ad6ef118149adc772d678575661eec7e5c8a5d111308adc12b3bee289a35093b8
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.rubocop.yml
CHANGED
@@ -11,6 +11,9 @@ Metrics/LineLength:
|
|
11
11
|
# This requires leading comments which can tend to be redundant.
|
12
12
|
Style/Documentation:
|
13
13
|
Enabled: false
|
14
|
+
# I prefer my underscore convention.
|
15
|
+
Naming/MemoizedInstanceVariableName:
|
16
|
+
Enabled: false
|
14
17
|
|
15
18
|
Metrics/BlockLength:
|
16
19
|
Exclude:
|
@@ -21,6 +24,10 @@ Metrics/BlockLength:
|
|
21
24
|
Layout/IndentHeredoc:
|
22
25
|
Enabled: false
|
23
26
|
|
27
|
+
# When we use $stderr.puts, we don't see that as verbose.
|
28
|
+
Style/StderrPuts:
|
29
|
+
Enabled: false
|
30
|
+
|
24
31
|
# Extra cops:
|
25
32
|
|
26
33
|
# Encourages block syntax for things like File.open
|
@@ -46,7 +53,9 @@ Lint/LiteralInInterpolation:
|
|
46
53
|
Enabled: true
|
47
54
|
|
48
55
|
# Personal preference. Makes the diffs smaller.
|
49
|
-
Style/
|
56
|
+
Style/TrailingCommaInArrayLiteral:
|
57
|
+
EnforcedStyleForMultiline: consistent_comma
|
58
|
+
Style/TrailingCommaInHashLiteral:
|
50
59
|
EnforcedStyleForMultiline: consistent_comma
|
51
60
|
Style/TrailingCommaInArguments:
|
52
61
|
EnforcedStyleForMultiline: consistent_comma
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
v2.2.2
|
2
|
+
|
3
|
+
* Removes `output_dir` from configuration as it hasn't been used since 1..
|
4
|
+
* Rubocop cleanups.
|
5
|
+
* Fix situation where cert_name has invalid chars. Fixes #114.
|
6
|
+
|
1
7
|
v2.2.1
|
2
8
|
|
3
9
|
* Fixes issue where older (pre-2.1.0) configs would have a string as the domain. Converts this to array internally.
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -167,9 +167,9 @@ Normally, you will run the script manually once to get the certificate, and then
|
|
167
167
|
Your Cron task could look something like:
|
168
168
|
|
169
169
|
# System Ruby Installation
|
170
|
-
0 4 1 */2 * PATH=$PATH:$GEM_HOME/bin:/usr/local/bin GEM_HOME=$HOME/.letsencrypt_webfaction/gems RUBYLIB=$GEM_HOME/lib ruby2.2 $HOME/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction --letsencrypt_account_email [you@youremail.com] --domains [yourdomain.com,www.yourdomain.com] --public ~/webapps/[yourapp/your_public_html]/ --quiet
|
170
|
+
0 4 1 */2 * PATH=$PATH:$GEM_HOME/bin:/usr/local/bin GEM_HOME=$HOME/.letsencrypt_webfaction/gems RUBYLIB=$GEM_HOME/lib ruby2.2 $HOME/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction --letsencrypt_account_email [you@youremail.com] --domains [yourdomain.com,www.yourdomain.com] --public ~/webapps/[yourapp/your_public_html]/ --quiet --username [yourusername] --password [yourpassword]
|
171
171
|
# RBEnv Installation
|
172
|
-
0 4 1 */2 * RBENV_ROOT=~/.rbenv RBENV_VERSION=2.3.1 ~/.rbenv/bin/rbenv exec letsencrypt_webfaction --letsencrypt_account_email [you@youremail.com] --domains [yourdomain.com,www.yourdomain.com] --public ~/webapps/[yourapp/your_public_html]/ --quiet
|
172
|
+
0 4 1 */2 * RBENV_ROOT=~/.rbenv RBENV_VERSION=2.3.1 ~/.rbenv/bin/rbenv exec letsencrypt_webfaction --letsencrypt_account_email [you@youremail.com] --domains [yourdomain.com,www.yourdomain.com] --public ~/webapps/[yourapp/your_public_html]/ --quiet --username [yourusername] --password [yourpassword]
|
173
173
|
|
174
174
|
*Note the usage of `--quiet` to keep the success message from being shown and emailed.*
|
175
175
|
|
@@ -177,7 +177,7 @@ This [would run](http://crontab.guru/#0_4_1_*/2_*) at 4 a.m. on the first day of
|
|
177
177
|
|
178
178
|
If you have more than one Cron task running like this, you may want to set the environment variables at the top of the file, and create a config file containing the contact information.
|
179
179
|
|
180
|
-
If you want to be notified upon failure, you can add `MAILTO=[you@youremail.com]` to the top of the crontab. This will send you an email whenever any cron job outputs standard out or standard error, which is generally good practice.
|
180
|
+
If you want to be notified upon failure, you can add `MAILTO=[you@youremail.com]` to the top of the crontab. This will send you an email whenever any cron job outputs standard out or standard error, which is generally good practice. According to the Webfaction [Cron documentaion](https://docs.webfaction.com/software/general.html#scheduling-tasks-with-cron) some webfaction servers also require you to add `MAILFROM=[you@youremail.com]` to the top of the crontab.
|
181
181
|
|
182
182
|
## Upgrading
|
183
183
|
|
data/config.defaults.yml
CHANGED
data/config.example.yml
CHANGED
@@ -3,8 +3,6 @@
|
|
3
3
|
key_size: 4096
|
4
4
|
endpoint: 'https://acme-v01.api.letsencrypt.org/'
|
5
5
|
letsencrypt_account_email: 'me@example.com'
|
6
|
-
domains:
|
7
|
-
- 'example.com'
|
8
|
-
- 'www.example.com'
|
6
|
+
domains: ['example.com','www.example.com']
|
9
7
|
# The webroot of the application.
|
10
8
|
public: '/home/myuser/webapps/myapp/public_html'
|
@@ -19,7 +19,6 @@ module LetsencryptWebfaction
|
|
19
19
|
Field.new(:endpoint, 'ACME endpoint (e.g. https://acme-v01.api.letsencrypt.org/)', [StringValidator.new]),
|
20
20
|
Field::ListField.new(:domains, 'Comma separated list of domains. The first one will be the common name.', [ArrayValidator.new]),
|
21
21
|
Field::ListField.new(:public, 'Locations on the filesystem served by the desired sites (e.g. "~/webapps/myapp/public_html,~/webapps/myapp1/public_html")', [ArrayValidator.new]),
|
22
|
-
Field.new(:output_dir, 'Location on the filesystem to which the certs will be saved.', [StringValidator.new]),
|
23
22
|
Field.new(:letsencrypt_account_email, 'The email address associated with your account.', [StringValidator.new]),
|
24
23
|
Field.new(:api_url, 'The URL to the Webfaction API.', [StringValidator.new]),
|
25
24
|
Field.new(:username, 'The username for your Webfaction account.', [StringValidator.new]),
|
@@ -127,7 +126,6 @@ module LetsencryptWebfaction
|
|
127
126
|
end
|
128
127
|
|
129
128
|
def parse!
|
130
|
-
# rubocop:disable Style/GuardClause
|
131
129
|
opt_parser.parse!(@options)
|
132
130
|
|
133
131
|
# Set default hostname
|
@@ -137,8 +135,9 @@ module LetsencryptWebfaction
|
|
137
135
|
|
138
136
|
# Set default cert_name
|
139
137
|
if @cert_name.nil? || @cert_name == ''
|
140
|
-
@cert_name = @domains[0]
|
138
|
+
@cert_name = @domains[0] if @domains.any?
|
141
139
|
end
|
140
|
+
@cert_name = @cert_name.gsub(/[^a-zA-Z\d_]/, '_')
|
142
141
|
end
|
143
142
|
end
|
144
143
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: letsencrypt_webfaction
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Johnston
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
Bgn1/q+P8H+/qkt6w5h8UzWYyXRlEjWvSJEjkNU0C05GQ0w0GFiqd62CgQty5xpa
|
31
31
|
7M3NhWEjOZHE18Ro4Vy9CQCJxUasYC4JUMMQ9tQBW+vYIgHfBn0+xlw=
|
32
32
|
-----END CERTIFICATE-----
|
33
|
-
date:
|
33
|
+
date: 2018-03-25 00:00:00.000000000 Z
|
34
34
|
dependencies:
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: acme-client
|
metadata.gz.sig
CHANGED
Binary file
|