sparoid 2.2.1 → 2.3.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
  SHA256:
3
- metadata.gz: 71eaf9ec6bae245550f5134ddd360754aa3b360342551676bea056083a56ee8b
4
- data.tar.gz: d97abd87405cd9c65bc96583648f6f2075867b08bab919e8871ed95de5e2e4f0
3
+ metadata.gz: 2e372cc3353dca22edcde8e70a908e425bb287ef6429529cd22fad88eb8a9dde
4
+ data.tar.gz: 3f624ae4466167b81010e96cdcfec142ca8a787075dc7ba66c5c86006781659b
5
5
  SHA512:
6
- metadata.gz: 4a4426c422d8c973596758cdfeed9e23a256aa697605e9beaa9c1aa6b06f14d2fbcf5712a8fd44e25d830ed97f47912e0b707e5006d52139f686efdcf288cec9
7
- data.tar.gz: b7df47069061130c91155b86fa8385f8ca2c77919baf1189c7513db3f2aca7fc1bff06f8b8e8911184ef8c2014bf8092e9b1933af6692a4137a5155c1923a7d1
6
+ metadata.gz: 7c352924f57db09bebbcdf1be25dd96e7ef0b21ec8d12d01b057457fe73afd80c0bb3f9de5c13d6896fced17a184591ada5d3a4d81b7a75e33701d14a7ef58ff
7
+ data.tar.gz: 524c8c5d4920078ff22d3440e7960afd4f96a928632735208b4dd01fff07cad623ac229500cd170cd31c39f3cd6cb2f7e65b0d9a3f8a71f510704f8074b54ca5
@@ -8,6 +8,8 @@ on:
8
8
 
9
9
  jobs:
10
10
  build:
11
+ permissions:
12
+ contents: read
11
13
  strategy:
12
14
  fail-fast: false
13
15
  matrix:
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [2.3.0] - 2026-10-13
2
+
3
+ - Add Sparoid::Instance#reset_public_ips to drop cached public IPs so the next knock resolves them again (#27)
4
+
1
5
  ## [2.2.1] - 2026-06-30
2
6
 
3
7
  - Make Sparoid::Instance public-IP resolution thread-safe and empty-aware; raise Sparoid::PublicIPError when no public IP resolves (#25)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sparoid
4
- VERSION = "2.2.1"
4
+ VERSION = "2.3.0"
5
5
  end
data/lib/sparoid.rb CHANGED
@@ -281,5 +281,11 @@ module Sparoid # rubocop:disable Metrics/ModuleLength
281
281
  ips
282
282
  end
283
283
  end
284
+
285
+ # Forget the cached public IPs so the next knock resolves them again.
286
+ # Call it when a connection after a knock fails, in case the public IP changed.
287
+ def reset_public_ips
288
+ @resolve_mutex.synchronize { @public_ips = [] }
289
+ end
284
290
  end
285
291
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sparoid
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carl Hörberg