acme_nsupdate 0.4.0 → 0.4.1

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: bc260ec101b559b2dfd436b9e0b5966b2311c37b32094b868df7bb334aee9312
4
- data.tar.gz: 0a0de9a4ba9e2b098216ad042ff7be40c58c92e10695bf40996f8f7a4354e688
3
+ metadata.gz: 3e1b004d46a0db137ee5f6192a1cb15d390126ae015e1fe0bf63b07521728e1a
4
+ data.tar.gz: ef1eace7977e874bd2eab6b88684c43757a1836f35f396d29eaa2098f98ca82c
5
5
  SHA512:
6
- metadata.gz: f443e2e27948180e54b17af0a4b3f71829544ff6f4ff2407bf8c2245812dd0cda7554b140047f8adfbbc303dcefcc93ee68ebf3f3b22a488f85eea59e28120dd
7
- data.tar.gz: 294fe014df4df6dd2800d7ddae0bdfcd4b944d0bb77753d77edc5cc04704bf4f7441d68d4f5e2978c2464c8eaf0739816ad405c093b8a17d905b7331f52efec9
6
+ metadata.gz: 2426cb0c59ff70854843bdd5d120770c1b3f7fdbdc76b7433bc998c63e3c704d54238d720953696a10a9fa49503eb41254fac9ddf7a4b5003206be40bf89e937
7
+ data.tar.gz: cdad307cd058a0ff61a9f180bfff1b74e4ea0598a6f75e91f151e2f260634ed4cf393d63d9b2362da43c83323cb40ad4cb85d37fad211f81bd30c558163d3e54
@@ -14,6 +14,18 @@ module AcmeNsupdate
14
14
  class Error < RuntimeError
15
15
  end
16
16
 
17
+ class DebuggableClient < Acme::Client
18
+ attr_accessor :logger
19
+
20
+ def new_connection endpoint:
21
+ super do |configuration|
22
+ yield(configuration) if block_given?
23
+ configuration.response :detailed_logger, @logger if @logger
24
+ end
25
+ end
26
+
27
+ end
28
+
17
29
  RENEWAL_THRESHOLD = 2_592_000 # 30*24*60*60, 30 days
18
30
 
19
31
  attr_reader :options, :logger
@@ -53,8 +65,8 @@ module AcmeNsupdate
53
65
  end
54
66
 
55
67
  def client
56
- @client ||= Acme::Client.new(private_key: account_key, directory: @options[:endpoint]).tap do |client|
57
- client.connection.response :detailed_logger, @logger if @options[:verbose]
68
+ @client ||= DebuggableClient.new(private_key: account_key, directory: @options[:endpoint]).tap do |client|
69
+ client.logger = @logger if @options[:verbose]
58
70
  end
59
71
  end
60
72
 
@@ -94,7 +106,7 @@ module AcmeNsupdate
94
106
  end
95
107
 
96
108
  def fetch_certificate order
97
- order.finalize csr
109
+ order.finalize csr: csr
98
110
  while order.status == 'processing'
99
111
  sleep 3
100
112
  order.reload
@@ -1,3 +1,3 @@
1
1
  module AcmeNsupdate
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acme_nsupdate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonne Haß