sps-pub 0.5.1 → 0.5.2
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
- checksums.yaml.gz.sig +0 -0
- data/lib/sps-pub.rb +19 -16
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5825cd5db8b2c21341cb9c810a90f3c1e638904e
|
4
|
+
data.tar.gz: a61713bbb68f00a4512246f498843ace9b19dcc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a980f9705d0f3511b768f339e52cdcb1d71216860449d430629dc3bb1cfa86b5deef7edafae9c06adf3cc4891e488d1c17b5be854699335a4fd05ce873d9311
|
7
|
+
data.tar.gz: 3f25f15a33a047a6ac9213ff49bcf03c8ca95437cf1279f2ecd492ea86b5d091742bac8befa2a2234404bc5ba6bc371994dc489ff1a26c9282dd55c5cc983f21
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/sps-pub.rb
CHANGED
@@ -24,28 +24,31 @@ class SPSPub
|
|
24
24
|
def self.notice(s, hostx='sps', host: hostx, address: host,
|
25
25
|
port: '59000', retries: 3)
|
26
26
|
|
27
|
-
retry_attempts = 0
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
begin
|
33
|
-
|
34
|
-
client.send s
|
28
|
+
ws = WebSocket::Client::Simple.connect "ws://%s:%s/" % [address, port]
|
29
|
+
|
30
|
+
ws.on :open do
|
35
31
|
|
36
|
-
|
32
|
+
retry_attempts = 0
|
37
33
|
|
38
|
-
|
34
|
+
begin
|
39
35
|
|
40
|
-
|
41
|
-
|
42
|
-
|
36
|
+
ws.send s
|
37
|
+
|
38
|
+
rescue Errno::ETIMEDOUT => e
|
39
|
+
|
40
|
+
if retries and retry_attempts < retries then
|
41
|
+
|
42
|
+
retries += 1
|
43
|
+
puts 'SPSPub timeout retrying ...'
|
44
|
+
retry
|
45
|
+
|
46
|
+
else
|
47
|
+
puts 'SPSPub timeout while trying to contact the host'
|
48
|
+
end
|
43
49
|
|
44
|
-
else
|
45
|
-
puts 'SPSPub timeout while trying to contact the host'
|
46
50
|
end
|
47
|
-
|
48
|
-
end
|
51
|
+
end
|
49
52
|
|
50
53
|
:message_sent
|
51
54
|
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sps-pub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
Ke//2Urv5XozW5nKniqR+yI7YVIlgDHWEjHdlCaQH3fMHsliDCeDF/lxRd902EDM
|
32
32
|
pCvgnGqKZoDb7g==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2017-01-
|
34
|
+
date: 2017-01-02 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: websocket-client-simple
|
metadata.gz.sig
CHANGED
Binary file
|