acmesmith 2.7.0 → 2.7.1

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
  SHA256:
3
- metadata.gz: '00710093e0dc9f9ec6ba1d54bf67585d45efa053e8a6bd7250c638abfce17908'
4
- data.tar.gz: ecff83969fbf75e8566f1f75638b35937615af3d9fe05a759663d1a82b5d11af
3
+ metadata.gz: de52b6d87714b27035507ce19c8dccc5c876cebebed05ce06d9865858f2f0fec
4
+ data.tar.gz: 7aef801a33ea26c22db4a38c1c3af2d9432862dc3ffa383e47b23a12ab296531
5
5
  SHA512:
6
- metadata.gz: 6df65f1bef30badd2f6691bebeeadf2548d878404a31b166a8fb607aae1027c02345162db7068bb3eb276718aae819dd31ec0188a6075d6fd69d28252d4c79d6
7
- data.tar.gz: c2689ab6ffcd876a5af2c7c4b25c1b4b2553c20c07472b8698d1b43787ad2ed5bac72354381aa76b4da6fb64fd5a2f60b2ee09006f58caa1b16083e12067e391
6
+ metadata.gz: fbcfef0acbd3e20a3f9245a41fd7f3bd74e33bf7333f307ee32047a330b7b30c213260e59cc4571b98fc650a89b9d424fa66097a776f52ad2f9a0ecbb1eb5a4a
7
+ data.tar.gz: 94479e7616793c0cf51bfd3083a1ce6195c6ff886d7516fb62e841b5d93eaf14540dd9793030d33b273ef9b6fc3fa3f06abbb8be43af3a08e47b7f871aea2b60
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## v2.7.1 (2025-08-21)
2
+
3
+ ### Bug fixes
4
+
5
+ - autorenew: Failed when expired certificates were present. [#72](https://github.com/sorah/acmesmith/issues/72)
6
+
1
7
  ## v2.7.0 (2025-04-28)
2
8
 
3
9
  ### Enhancements
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- acmesmith (2.7.0)
4
+ acmesmith (2.7.1)
5
5
  acme-client (>= 2.0.7, < 3)
6
6
  aws-sdk-acm
7
7
  aws-sdk-route53
@@ -67,7 +67,7 @@ GEM
67
67
  diff-lcs (>= 1.2.0, < 2.0)
68
68
  rspec-support (~> 3.13.0)
69
69
  rspec-support (3.13.2)
70
- thor (1.3.2)
70
+ thor (1.4.0)
71
71
  uri (1.0.3)
72
72
 
73
73
  PLATFORMS
@@ -156,7 +156,13 @@ module Acmesmith
156
156
 
157
157
  # @param [Numeric] duration
158
158
  def format_duration(duration)
159
- raise ArgumentError if !duration.is_a?(Numeric) || duration < 0
159
+ raise ArgumentError if !duration.is_a?(Numeric)
160
+ negative = if duration < 0
161
+ duration *= -1
162
+ true
163
+ else
164
+ false
165
+ end
160
166
 
161
167
  # Calculate components using divmod
162
168
  days, remainder = duration.divmod(86400)
@@ -167,6 +173,7 @@ module Acmesmith
167
173
  [[days, 'd'], [hours, 'h'], [minutes, 'm'], [seconds, 's']]
168
174
  .select { |v,| v > 0 }
169
175
  .map { |v, unit| "#{v.to_i}#{unit}" }
176
+ .then { |a| negative ? ['-', *a] : a }
170
177
  .join
171
178
  end
172
179
 
@@ -1,3 +1,3 @@
1
1
  module Acmesmith
2
- VERSION = "2.7.0"
2
+ VERSION = "2.7.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acmesmith
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.0
4
+ version: 2.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sorah Fukumori
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-04-28 00:00:00.000000000 Z
10
+ date: 2025-08-20 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: acme-client