letsencrypt_webfaction 3.1.2 → 3.2.0

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
  SHA256:
3
- metadata.gz: ca19be7ab1c450ae3f6c0155854b9db9ed2173fe0bab405a332aac3bd9bdb665
4
- data.tar.gz: e6e72ea97abb662061c0c93c49aa50348516c81e04d7653a7391f51c4f777831
3
+ metadata.gz: c7ddff943c155f7b42dfb270c211d06fe766604ab692a3352affa77d9b970662
4
+ data.tar.gz: 5cc3af0aab0fecef297e2a6f934f49a32f2a7e3a0b700cfede6575bc9393239d
5
5
  SHA512:
6
- metadata.gz: ca138cf5f6882f4ce6b4428461104a91fffa062578b8218e382c31a7c60f93b61eef49fa23bf27ab5cc6d7a2ed7a37b54295747b29a2c054ee3f4cf4dd180cac
7
- data.tar.gz: 631054cdd66927a643b29a412fd7ebd7ca173373f64993aeb54704e18436b8af4b28a39eb6b0704fb47c61b63b5402474eb59fd3119f66f4b82b14d840824482
6
+ metadata.gz: e2829cfe4a51c6bd15db4e9cedb09577709985ad2eb8c0b03ff280b45a37bcf9147dbe4dcd5a2d66644d82869a8f37abb433457740afd72951c808a88323f3f5
7
+ data.tar.gz: 830363149c5f8bc4eef84151e784f03c5567b78ff1f2e1dfa684b84a394e3772268fdcbe7a35706dfb124e4084f38588a53055ef5b1b1289070f297411f82930
Binary file
data.tar.gz.sig CHANGED
@@ -1 +1,3 @@
1
- �>|Ņ����d�!H���H2�/r�~�ku�����K�YK�{X��/�����X�y��;�5\��l�0!
1
+ ���_��w����@�������;`�/-�D!��Tg@����PX���e��G����E���á/׫i���m+#D
2
+ Qa����
3
+ &����)m���cKo���0��z�x$��Rq�}M�i��.�m�� x��!Xd�vu ��x�W�Z� �d���ϸc�gT��a �DF���;����2~�o��Ǿ_R(�G3˘e�M���Rq����?;ᛌ=��������@����j���F��\i�OGI1��P��%�?�
@@ -2,6 +2,10 @@ Unreleased
2
2
 
3
3
  * Your change here!
4
4
 
5
+ v3.2.0
6
+
7
+ * New `--force` argument for easier handling of `endpoint` switching. Fixes [#132](https://github.com/will-in-wi/letsencrypt-webfaction/issues/132)
8
+
5
9
  v3.1.2
6
10
 
7
11
  * [#147](https://github.com/will-in-wi/letsencrypt-webfaction/pull/147) - Changed `RENEWAL_DELTA` to 30 days per LetsEncrypt's recommendation. (@shannonturner)
data/README.md CHANGED
@@ -58,7 +58,7 @@ Add the following to `~/.bash_profile` (using, for example, an FTP client or you
58
58
 
59
59
  ```sh
60
60
  function letsencrypt_webfaction {
61
- PATH=$PATH:$GEM_HOME/bin GEM_HOME=$HOME/.letsencrypt_webfaction/gems RUBYLIB=$GEM_HOME/lib ruby2.2 $HOME/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction $*
61
+ GEM_HOME=$HOME/.letsencrypt_webfaction/gems PATH=$PATH:$GEM_HOME/bin RUBYLIB=$GEM_HOME/lib ruby2.2 $HOME/.letsencrypt_webfaction/gems/bin/letsencrypt_webfaction $*
62
62
  }
63
63
  ```
64
64
  This will simplify the running of the LetsEncrypt WebFaction command, by setting some variables in advance.
@@ -91,6 +91,8 @@ The commands are `init` and `run`. You can add the `--quiet` argument to the `ru
91
91
 
92
92
  To test certificate issuance, consider using the [LetsEncrypt staging server](https://community.letsencrypt.org/t/testing-against-the-lets-encrypt-staging-environment/6763). This doesn't have the rate limit of 5 certs per domain every 7 days. You can change the `endpoint` config line to be `https://acme-staging.api.letsencrypt.org/` in order to test the system.
93
93
 
94
+ After switching endpoints, you will likely want to run the command with `--force` in order to reissue all certificates from the new endpoint.
95
+
94
96
  ### Operation
95
97
 
96
98
  When letsencrypt_webfaction runs, it places verification files into the public directory specified, validates the domains with LetsEncrypt, and then uploads the certificate to WebFaction's API.
@@ -1,3 +1,3 @@
1
1
  module LetsencryptWebfaction
2
- VERSION = '3.1.2'.freeze
2
+ VERSION = '3.2.0'.freeze
3
3
  end
@@ -70,7 +70,7 @@ module LetsencryptWebfaction
70
70
  end
71
71
  end
72
72
 
73
- def parse_options(args)
73
+ def parse_options(args) # rubocop:disable Metrics/MethodLength
74
74
  OptionParser.new do |opts|
75
75
  opts.banner = 'Usage: letsencrypt_webfaction run [options]'
76
76
 
@@ -81,6 +81,10 @@ module LetsencryptWebfaction
81
81
  opts.on('--config=CONFIG', 'Alternative configuration path') do |c|
82
82
  @config_path = CustomConfigPath.new(c)
83
83
  end
84
+
85
+ opts.on('--force', 'When passed, all certs are re-issued regardless of expiration') do |d|
86
+ @force_refresh = d
87
+ end
84
88
  end.parse!(args)
85
89
  end
86
90
 
@@ -88,7 +92,10 @@ module LetsencryptWebfaction
88
92
  wf_cert_list = api_credentials.call('list_certificates')
89
93
  @options.certificates.each do |cert|
90
94
  wf_cert = wf_cert_list.find { |c| c['name'] == cert.cert_name }
91
- if wf_cert.nil?
95
+ if @force_refresh
96
+ # Issue because nonexistent
97
+ Out.puts "Force issuing #{cert.cert_name}."
98
+ elsif wf_cert.nil?
92
99
  # Issue because nonexistent
93
100
  Out.puts "Issuing #{cert.cert_name} for the first time."
94
101
  elsif wf_cert['domains'].split(',').map(&:strip).sort == cert.domains.sort
@@ -6,7 +6,8 @@ password = "mypassword"
6
6
  letsencrypt_account_email = "me@example.com"
7
7
 
8
8
  # The ACME endpoint. Use the staging server until you get everything working.
9
- # Then switch to the production endpoint.
9
+ # Then switch to the production endpoint. You may want to run with the --force
10
+ # command after switching to reissue all certificates.
10
11
  endpoint = "https://acme-staging.api.letsencrypt.org/" # Staging
11
12
  #endpoint = "https://acme-v01.api.letsencrypt.org/" # Production
12
13
 
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: 3.1.2
4
+ version: 3.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Johnston
@@ -30,7 +30,7 @@ cert_chain:
30
30
  ilYPju4QWNSvpNVhV+T7JUvAHXva3Rayfp8SKRpvX8ZpRCjvpYfgbmNxXO2ST1qb
31
31
  KBba/yJfCMh+B65HfRUXBQRRDtJ2Vu8i0WmRUKenahAnpkkeVmqhWwY=
32
32
  -----END CERTIFICATE-----
33
- date: 2018-08-09 00:00:00.000000000 Z
33
+ date: 2018-08-12 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: acme-client
metadata.gz.sig CHANGED
@@ -1,2 +1,3 @@
1
- �AݍR�sf}|�{���D�ï�N��t���ˍ��H�����'9�`I��5�J
2
- ������p/�]��6En*�Ft��6?;X�:?��T��T3lH�ٙ��\찱k����5��]��j'pStmOGw&��;J-�m��=�p�㞧���>W�� �r/�X�I����p�$�S�.�,S����hc>o�g��[v��T�8�}���r�d��
1
+ ҏ�p�nA��?�0�`�S��O���b7
2
+ V��&�XP A
3
+ �cEs�_,�cs���1��4�K�f�b�̥����`�<