sps_duplex 0.1.0 → 0.1.1
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 +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/sps_duplex.rb +16 -6
- metadata +25 -25
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: deb70d8e0e48318377a201e72f5550c295c86ae3c1a9bcbf4936cdd10df1e447
|
4
|
+
data.tar.gz: 9c1a58d4f436c64fa50cba3a1d8f8b712ac08c963ac6c4374069702faea2ad03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6bd29c7ed5ecd9c4f3302ed973d612b544f4a0bef204cf5aecbf73e9e1d4720ac2cf58332397cc3ff42942dcb8103bde4e60cabd98d583701db942226d9ba17
|
7
|
+
data.tar.gz: fe1c041b49d502c5c90ae5849fef2707019fb450a6df8061f1b8a3f2a7f7f1e1111c83462d5970a444753fa9908446b1051509d2e41c4cab534dcdc983a53f01
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/sps_duplex.rb
CHANGED
@@ -9,7 +9,7 @@ require 'sps-sub'
|
|
9
9
|
class SPSDuplex
|
10
10
|
|
11
11
|
def initialize(host: 'localhost', port: '55000', topic: 'chan1',
|
12
|
-
sub_topic: 'node1', pub_topic: 'node2')
|
12
|
+
sub_topic: 'node1', pub_topic: 'node2', interactive: true)
|
13
13
|
|
14
14
|
|
15
15
|
sps = SPSSub.new host: host, port: port, callback: self
|
@@ -17,12 +17,22 @@ class SPSDuplex
|
|
17
17
|
sleep 1 # give it a second to connect
|
18
18
|
|
19
19
|
topic_path = [topic]
|
20
|
-
Thread.new { sps.subscribe topic: (topic_path + [sub_topic]).join('/') }
|
21
|
-
|
22
|
-
@pub = SPSPub.new address: host, port: port
|
23
20
|
|
24
|
-
|
25
|
-
|
21
|
+
if interactive then
|
22
|
+
|
23
|
+
Thread.new { sps.subscribe topic: (topic_path + [sub_topic]).join('/') }
|
24
|
+
|
25
|
+
@pub = SPSPub.new address: host, port: port
|
26
|
+
|
27
|
+
topic_path << pub_topic
|
28
|
+
@topic = topic_path.join('/')
|
29
|
+
else
|
30
|
+
|
31
|
+
@pub = sps
|
32
|
+
@topic = (topic_path + [pub_topic]).join('/')
|
33
|
+
sps.subscribe topic: (topic_path + [sub_topic]).join('/')
|
34
|
+
|
35
|
+
end
|
26
36
|
|
27
37
|
end
|
28
38
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sps_duplex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -10,27 +10,28 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
13
|
+
MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
|
14
|
+
YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
|
15
|
+
8ixkARkWAmV1MB4XDTIwMDYyODIyMTYxNFoXDTIxMDYyODIyMTYxNFowSDESMBAG
|
16
|
+
A1UEAwwJZ2VtbWFzd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qet
|
31
|
+
SjiYSWqCApmgaqtDaClCgujS6l+r1SROyr3aJc08SgekrbUBC04MUlv8Y5pCr5zQ
|
32
|
+
SUd37HyPEIUylA==
|
32
33
|
-----END CERTIFICATE-----
|
33
|
-
date:
|
34
|
+
date: 2020-06-28 00:00:00.000000000 Z
|
34
35
|
dependencies:
|
35
36
|
- !ruby/object:Gem::Dependency
|
36
37
|
name: sps-sub
|
@@ -41,7 +42,7 @@ dependencies:
|
|
41
42
|
version: '0.3'
|
42
43
|
- - ">="
|
43
44
|
- !ruby/object:Gem::Version
|
44
|
-
version: 0.3.
|
45
|
+
version: 0.3.7
|
45
46
|
type: :runtime
|
46
47
|
prerelease: false
|
47
48
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -51,7 +52,7 @@ dependencies:
|
|
51
52
|
version: '0.3'
|
52
53
|
- - ">="
|
53
54
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.3.
|
55
|
+
version: 0.3.7
|
55
56
|
- !ruby/object:Gem::Dependency
|
56
57
|
name: sps-pub
|
57
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,8 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
99
|
- !ruby/object:Gem::Version
|
99
100
|
version: '0'
|
100
101
|
requirements: []
|
101
|
-
|
102
|
-
rubygems_version: 2.6.13
|
102
|
+
rubygems_version: 3.0.3
|
103
103
|
signing_key:
|
104
104
|
specification_version: 4
|
105
105
|
summary: A gem to allow 2 way communication using a SimplePubSub broker.
|
metadata.gz.sig
CHANGED
Binary file
|