acmesmith 0.9.0 → 0.10.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0a2e1bf037c36dc0857c9cdde9192e9dffe196a6
4
- data.tar.gz: d04ffac3735b0af4b0e9394749ae015d9dc16eb3
3
+ metadata.gz: 39060c7505c4a73bfccf496d1015c69573e247b7
4
+ data.tar.gz: f021fc666dee39ce983143b8b42c6d89fe10e336
5
5
  SHA512:
6
- metadata.gz: 44f73438e93e201a937a769ae8481c8696144d190c238584af7cfec216616f9c76d8bfe5cb4f4fe4c3f4d107435e2e288fdfdde0394c992835c2ccb554abc088
7
- data.tar.gz: 58efd6b4f0dc19f0602cf69f41ccf5a4659a3e58b58e8fdf4da5df09701e1da749da1d8ed69c5b407b5beb415ddcb9daea18d3122ca3dadbc883e9acf4321507
6
+ metadata.gz: 07ee7ce1383349bd7fbc93d78fe97bca3d9407df833c3d7f299d5fd17ef1307118f5e50f8c28523a131cc9756cfb858d9aa465a43850d6f86a723b8f06515fdc
7
+ data.tar.gz: be76cdfe37a4988c9dfdb1db3d3fb49bc16ba7fe719ae7ad588f22a1f636f74b19f9f5383464d52128055bcc83e9de7102528ba04b2df98b887b2deb157d6176
@@ -178,8 +178,8 @@ module Acmesmith
178
178
  end
179
179
  end
180
180
 
181
- def autorenew(days)
182
- storage.list_certificates.each do |cn|
181
+ def autorenew(days: 7, common_names: nil)
182
+ (common_names || storage.list_certificates).each do |cn|
183
183
  puts "=> #{cn}"
184
184
  cert = storage.get_certificate(cn)
185
185
  not_after = cert.certificate.not_after.utc
@@ -93,10 +93,10 @@ module Acmesmith
93
93
  client.save_pkcs12(common_name, version: options[:version], mode: options[:mode], output: options[:output], passphrase: passphrase)
94
94
  end
95
95
 
96
- desc "autorenew", "request renewal of certificates which expires soon"
96
+ desc "autorenew [COMMON_NAMES]", "request renewal of certificates which expires soon"
97
97
  method_option :days, type: :numeric, aliases: %w(-d), default: 7, desc: 'specify threshold in days to select certificates to renew'
98
- def autorenew
99
- client.autorenew(options[:days])
98
+ def autorenew(*common_names)
99
+ client.autorenew(days: options[:days], common_names: common_names.empty? ? nil : common_names)
100
100
  end
101
101
 
102
102
  desc "add-san COMMON_NAME [ADDITIONAL_SANS]", "request renewal of existing certificate with additional SANs"
@@ -1,3 +1,3 @@
1
1
  module Acmesmith
2
- VERSION = "0.9.0"
2
+ VERSION = "0.10.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acmesmith
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sorah (Shota Fukumori)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-01 00:00:00.000000000 Z
11
+ date: 2017-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: acme-client