sps-pub 0.4.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -2
- data/lib/sps-pub.rb +13 -7
- metadata +23 -23
- 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: ab9d248e2990551e063728e7ce2a914d496271f3
|
4
|
+
data.tar.gz: 7a0c0eb1f19cdaec132b8abfe673c9e4fd129f44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e45591640e5294aaf23570b1922297d8732729a4fa886ffc02be8f0ffb2855cde16b4deb8627f2e253574b833760ce95fc94491b56c658c1fed92f7e7bf75788
|
7
|
+
data.tar.gz: 2b62ade433a74973517cddb8f12619d795500de94abab57ce6b34d97181fd7de027b2d6aa3e83ac6c34881f6460eb47d17ee66c57230e2cfabef072d25a2f898
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
2
|
-
�
|
1
|
+
X���B�-�����+�ל���b_}�Y��$h<?Ol�� (^�Q*<[e���᱗~��|�/Z���*l݄��²��7�b�
|
2
|
+
J��Ȝ#vADk�e����m��ݎ�$t�(��m��Xݫ�?lv��W}��<O�&j�+{�$<'���lD�]v����cju���٢"G-�p���?�\�7�R,s$nj�'�5�L�|*;��[j��Pߒ��z�p���O�(s���
|
data/lib/sps-pub.rb
CHANGED
@@ -2,13 +2,17 @@
|
|
2
2
|
|
3
3
|
# file: sps-pub.rb
|
4
4
|
|
5
|
-
require '
|
5
|
+
require 'websocket-client-simple'
|
6
6
|
|
7
7
|
|
8
8
|
class SPSPub
|
9
9
|
|
10
|
-
def initialize(
|
11
|
-
|
10
|
+
def initialize(host: 'sps', address: host, port: '59000')
|
11
|
+
|
12
|
+
|
13
|
+
@client = WebSocket::Client::Simple.connect "ws://%s:%s/" % [address, port]
|
14
|
+
sleep 0.02
|
15
|
+
|
12
16
|
end
|
13
17
|
|
14
18
|
def notice(s)
|
@@ -17,10 +21,12 @@ class SPSPub
|
|
17
21
|
|
18
22
|
alias publish notice
|
19
23
|
|
20
|
-
def self.notice(s,
|
24
|
+
def self.notice(s, hostx='sps', host: hostx, address: host,
|
25
|
+
port: '59000', retries: 3)
|
21
26
|
|
22
27
|
retry_attempts = 0
|
23
|
-
|
28
|
+
|
29
|
+
client = WebSocket::Client::Simple.connect "ws://%s:%s/" % [address, port]
|
24
30
|
|
25
31
|
begin
|
26
32
|
|
@@ -44,11 +50,11 @@ class SPSPub
|
|
44
50
|
|
45
51
|
end
|
46
52
|
|
47
|
-
def self.pub(s, address: 'sps', port: '59000')
|
53
|
+
def self.pub(s, address: 'sps', host: address, port: '59000')
|
48
54
|
self.notice(s, address: 'sps', port: '59000')
|
49
55
|
end
|
50
56
|
|
51
|
-
def self.publish(s, address: 'sps', port: '59000')
|
57
|
+
def self.publish(s, address: 'sps', host: address, port: '59000')
|
52
58
|
self.notice(s, address: 'sps', port: '59000')
|
53
59
|
end
|
54
60
|
|
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
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -12,47 +12,47 @@ cert_chain:
|
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
13
|
MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
|
14
14
|
YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
|
15
|
-
|
15
|
+
8ixkARkWA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OHm8KpQfusAn5dMrosUEne2qzEah5cJJNcLxnu1ECXXjprFpwcrDaQpUyb5RtbQA
|
29
|
+
r/gAnP8rfnByIVDhAZx6DW5lHDZMRho1RiU8y3JHHZNORxFXK5aFXM4Iic5FW+0e
|
30
|
+
xzPs/d0Uiyi13EXbME6s2eICY7NC/7sGThpgPvRIsfGF1b40gNY86Irh91pvyC2y
|
31
|
+
Ke//2Urv5XozW5nKniqR+yI7YVIlgDHWEjHdlCaQH3fMHsliDCeDF/lxRd902EDM
|
32
|
+
pCvgnGqKZoDb7g==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2017-01-01 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
|
-
name:
|
37
|
+
name: websocket-client-simple
|
38
38
|
requirement: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '0.
|
42
|
+
version: '0.3'
|
43
43
|
- - ">="
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version:
|
45
|
+
version: 0.3.0
|
46
46
|
type: :runtime
|
47
47
|
prerelease: false
|
48
48
|
version_requirements: !ruby/object:Gem::Requirement
|
49
49
|
requirements:
|
50
50
|
- - "~>"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '0.
|
52
|
+
version: '0.3'
|
53
53
|
- - ">="
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version:
|
55
|
+
version: 0.3.0
|
56
56
|
description:
|
57
57
|
email: james@r0bertson.co.uk
|
58
58
|
executables: []
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.
|
83
|
+
rubygems_version: 2.6.8
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: A SimplePubSub client for publishing messages in 1 line of code.
|
metadata.gz.sig
CHANGED
Binary file
|