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 +4 -4
- data/.github/workflows/main.yml +2 -0
- data/CHANGELOG.md +4 -0
- data/lib/sparoid/version.rb +1 -1
- data/lib/sparoid.rb +6 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2e372cc3353dca22edcde8e70a908e425bb287ef6429529cd22fad88eb8a9dde
|
|
4
|
+
data.tar.gz: 3f624ae4466167b81010e96cdcfec142ca8a787075dc7ba66c5c86006781659b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7c352924f57db09bebbcdf1be25dd96e7ef0b21ec8d12d01b057457fe73afd80c0bb3f9de5c13d6896fced17a184591ada5d3a4d81b7a75e33701d14a7ef58ff
|
|
7
|
+
data.tar.gz: 524c8c5d4920078ff22d3440e7960afd4f96a928632735208b4dd01fff07cad623ac229500cd170cd31c39f3cd6cb2f7e65b0d9a3f8a71f510704f8074b54ca5
|
data/.github/workflows/main.yml
CHANGED
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)
|
data/lib/sparoid/version.rb
CHANGED
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
|