sps-pub 0.4.1 → 0.4.3
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 +24 -3
- 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: 6ebc344417b378aded8289a69f8f31ec3335ae72
|
|
4
|
+
data.tar.gz: dada4b78af3af6e3924410993ad782f416a81ba4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 726066168133a30ed79e8cf0867ff793ac7dc5229b3752564f4f1c67b47447a36176631b66c256a5dc4d37026e377140aea300e22410333ba503309c95f65759
|
|
7
|
+
data.tar.gz: 6fee716949cc77f617fea34f8ced4d6c3335bb8b8cf938f75856ce9c2dcda335294b3088b3dc9bdd1a7f4eda2b0be3104273351183e1eb4067ec2d7ee3b991b7
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/sps-pub.rb
CHANGED
|
@@ -17,10 +17,31 @@ class SPSPub
|
|
|
17
17
|
|
|
18
18
|
alias publish notice
|
|
19
19
|
|
|
20
|
-
def self.notice(s, host='sps', address: host, port: '59000')
|
|
20
|
+
def self.notice(s, host='sps', address: host, port: '59000', retries: 3)
|
|
21
|
+
|
|
22
|
+
retry_attempts = 0
|
|
23
|
+
client = Net::WS.new "ws://%s:%s/" % [host, port]
|
|
24
|
+
|
|
25
|
+
begin
|
|
26
|
+
|
|
27
|
+
client.send s
|
|
28
|
+
|
|
29
|
+
rescue Errno::ETIMEDOUT => e
|
|
30
|
+
|
|
31
|
+
if retries and retry_attempts < retries then
|
|
32
|
+
|
|
33
|
+
retries += 1
|
|
34
|
+
puts 'SPSPub timeout retrying ...'
|
|
35
|
+
retry
|
|
36
|
+
|
|
37
|
+
else
|
|
38
|
+
puts 'SPSPub timeout while trying to contact the host'
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
:message_sent
|
|
21
44
|
|
|
22
|
-
client = Net::WS.new "ws://%s:%s/" % [host, port]
|
|
23
|
-
client.send s
|
|
24
45
|
end
|
|
25
46
|
|
|
26
47
|
def self.pub(s, address: 'sps', port: '59000')
|
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.4.
|
|
4
|
+
version: 0.4.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Robertson
|
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
|
31
31
|
lT+QKN4YL+1lu8YyhGAGcseECGWVFHn6ID0opcTHsJRrpNxb/+ddlPzkT4H+hfuP
|
|
32
32
|
TE5MmWrlPEJ9zA==
|
|
33
33
|
-----END CERTIFICATE-----
|
|
34
|
-
date: 2015-
|
|
34
|
+
date: 2015-11-18 00:00:00.000000000 Z
|
|
35
35
|
dependencies:
|
|
36
36
|
- !ruby/object:Gem::Dependency
|
|
37
37
|
name: simpleblockingwebsocketclient
|
metadata.gz.sig
CHANGED
|
Binary file
|