sparoid 1.0.13 → 1.0.14

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: 1f5904f6b6c520213811268420efad5fd5a387942352d8def32b722cd14420da
4
- data.tar.gz: 6f7e19f1515979078635ff1e862bc9bcbb6fb2172ac631d94b986dd1b95984fb
3
+ metadata.gz: 23058be45d03e24a374cdf7c2e1854f10c5c997eb8654a7af620a532a486cfd5
4
+ data.tar.gz: 38144ffb7b371f5c439efec31fd4c04323cf72ec4642f2b2b50da84dad7f7a25
5
5
  SHA512:
6
- metadata.gz: 6043c439103ae404d9dfc6855b0273777b3e1e505d768e36b7d5bf514abc6c2a0498ecda76ddf89994d4d3fb426394fc3994566e659842e377bab643b8edfcfd
7
- data.tar.gz: d95a3908952eb8134f1c68bd22a6f13f05ca99a8f1bda888c0adf6cbc77e882f65e4097a12b3db8a28ec74c624d8cee0821827ee12e54953da567606605f1e96
6
+ metadata.gz: '0860c3a2edea2a2f35628941f790846985683d6df89a66f6ac6a714af1e3eae1dd4618e6d58de620fc48d85c4da5bf35b6d9470597942b9fdb4f3382cbe1ff3c'
7
+ data.tar.gz: 22b61f2d97b87b3dbf2458df57177f0122ee9dd87c837c86da366a5bcf34d7c531cfa15fe60f2bb6959b9b939ca30175ae0b1f954ca0534512b821c11f20a578
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [1.0.14] - 2021-07-26
2
+
3
+ - Send UDP packets to all resolved IPs for a hostname
4
+
1
5
  ## [1.0.13] - 2021-06-30
2
6
 
3
7
  - Do not warn on empty public ip cache file
data/lib/sparoid.rb CHANGED
@@ -42,10 +42,17 @@ module Sparoid
42
42
  private
43
43
 
44
44
  def sendmsg(host, port, data)
45
+ ok = false
45
46
  UDPSocket.open do |socket|
46
- socket.connect host, port
47
- socket.sendmsg data, 0
47
+ Resolv.each_address(host) do |ip|
48
+ ok = true
49
+ socket.connect ip, port
50
+ socket.sendmsg data, 0
51
+ rescue StandardError => e
52
+ warn "Sparoid error: #{e.message}"
53
+ end
48
54
  end
55
+ abort "Sparoid failed to resolv #{host}" unless ok
49
56
  end
50
57
 
51
58
  def encrypt(key, data)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sparoid
4
- VERSION = "1.0.13"
4
+ VERSION = "1.0.14"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sparoid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.13
4
+ version: 1.0.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carl Hörberg
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-30 00:00:00.000000000 Z
11
+ date: 2021-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.1.6
72
+ rubygems_version: 3.2.15
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: Single Packet Authorisation client