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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c590b0a45e8aff3a06c033469cd8865f3f2ab229
4
- data.tar.gz: a23692c8443dca9cddff66e96fb9302a84c2cd71
3
+ metadata.gz: 70cdf0bbd92fee6c754762d779ad9637d851fb6d
4
+ data.tar.gz: 500669496025c30fdfe9d6e61071d1bbce4559c1
5
5
  SHA512:
6
- metadata.gz: c0f00eb5e332f28a8ff4d64f00038243d917849ff3e57e871e78c0c21d500a99d2da351145fca630c72840e1e8768fd37866d2060407771e33b30607d69e401e
7
- data.tar.gz: 2e7d7232dac737f2573834db8f5844d52ffbd58e52fc906555e4dba730eb87b9f106b439253afdeffd2142256b9deeb671de51b88b4e7d620d354472f9a2ce25
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/TrailingCommaInLiteral:
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
@@ -9,7 +9,7 @@ group :development, :test do
9
9
  gem 'pry-byebug', '~> 3.3'
10
10
  gem 'rake', '~> 10.0'
11
11
  gem 'rspec', '~> 3.4'
12
- gem 'rubocop', '~> 0.37'
12
+ gem 'rubocop', '~> 0.51'
13
13
  gem 'simplecov', '~> 0.11'
14
14
  gem 'webmock', '~> 2.1'
15
15
  end
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
@@ -3,7 +3,6 @@ key_size: 4096
3
3
  endpoint: 'https://acme-v01.api.letsencrypt.org/'
4
4
  domains: []
5
5
  public: []
6
- output_dir: '~/le_certs/'
7
6
  letsencrypt_account_email: ''
8
7
  api_url: 'https://api.webfaction.com/'
9
8
  username: ''
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'
@@ -1,4 +1,4 @@
1
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require 'letsencrypt_webfaction'
4
4
 
@@ -1,3 +1,3 @@
1
1
  module LetsencryptWebfaction
2
- VERSION = '2.2.1'.freeze
2
+ VERSION = '2.2.2'.freeze
3
3
  end
@@ -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].tr('.', '_') if @domains.any?
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.1
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: 2017-10-01 00:00:00.000000000 Z
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