sps-pub 0.3.2 → 0.4.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/lib/sps-pub.rb +1 -18
- data.tar.gz.sig +2 -4
- metadata +3 -24
- 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: 04615555f20e4174f2ddd00e7550be571c746f45
|
4
|
+
data.tar.gz: 822730ddf6fa0d30e79afeb6dcc5e6d4e3941b2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf7823194f92743106dd7b89939d9a181622ed58aa176715fdfc64517f1bb8574fcf46739399400721f6346783f6322ae002d0b45ce56f81a916e2330dfe7d51
|
7
|
+
data.tar.gz: 8bc253ce9538f60401d48b3fbc9f3d566542ee9464cee8707813484db2ff2286d851ea80abf8e13d39498f864fd0e52a0ab75c5d2e7031da01a7adead3a40264
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/sps-pub.rb
CHANGED
@@ -2,12 +2,10 @@
|
|
2
2
|
|
3
3
|
# file: sps-pub.rb
|
4
4
|
|
5
|
-
require '
|
6
|
-
require 'ws' # from gem 'simpleblockingwebsocketclient'
|
5
|
+
require 'ws'
|
7
6
|
|
8
7
|
|
9
8
|
class SPSPub
|
10
|
-
include SimplePubSub
|
11
9
|
|
12
10
|
def initialize(address: 'sps', port: '59000')
|
13
11
|
@client = Net::WS.new "ws://%s:%s/" % [address, port]
|
@@ -33,19 +31,4 @@ class SPSPub
|
|
33
31
|
self.notice(s, address: 'sps', port: '59000')
|
34
32
|
end
|
35
33
|
|
36
|
-
|
37
|
-
def self.listen(topic='#', address: 'sps')
|
38
|
-
|
39
|
-
Client.connect(address) do |client|
|
40
|
-
client.get(topic) do |topic, message|
|
41
|
-
puts "[%s] SPS listener INFO %s: %s" %
|
42
|
-
[Time.now.strftime("%Y-%m-%d %H:%M"), topic, message]
|
43
|
-
end
|
44
|
-
end
|
45
|
-
end
|
46
|
-
|
47
|
-
def self.subscribe(topic='#', address: 'sps')
|
48
|
-
self.listen(topic='#', address: 'sps')
|
49
|
-
end
|
50
|
-
|
51
34
|
end
|
data.tar.gz.sig
CHANGED
@@ -1,4 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
�q���m�5%V�Zz5�5���P��������X��#�^9�*S��������صF����Lv;u��?=�ذYSC��>��+�!d��V�X|K"��@OBC%Fx���C�4U��C���Y���ӱ�
|
4
|
-
(�Z1+�@�(�����-|wj�36�`��X}�
|
1
|
+
�ی��)��5����䖤+,���~�i�V넪!�4� 3����`��W+Q����#��[7�[���+�䃜9�1�p=��"����h9ݣ&zN����_��j����{��L�Ё�sBw�k\Q�}ě1���W�D2�]�^�&e�4���ܒ�F�ѣ����J�@���4��*\FL��$�i-USD����CGƽ���|����Y��������
|
2
|
+
�ֿ�ۣ���5̽l檂�*��۲ �W��0�x
|
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.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,28 +31,8 @@ cert_chain:
|
|
31
31
|
2cSEZ0QYbEwC3czzwEism6iYWhlBI/srC6g8JIr7pq91FybciqI5dk5RB7SE5Xgf
|
32
32
|
p7uZNkO8qc9/fg==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2014-07-
|
34
|
+
date: 2014-07-16 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: simplepubsub
|
38
|
-
requirement: !ruby/object:Gem::Requirement
|
39
|
-
requirements:
|
40
|
-
- - "~>"
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: '1.1'
|
43
|
-
- - ">="
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: 1.1.2
|
46
|
-
type: :runtime
|
47
|
-
prerelease: false
|
48
|
-
version_requirements: !ruby/object:Gem::Requirement
|
49
|
-
requirements:
|
50
|
-
- - "~>"
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: '1.1'
|
53
|
-
- - ">="
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
version: 1.1.2
|
56
36
|
- !ruby/object:Gem::Dependency
|
57
37
|
name: simpleblockingwebsocketclient
|
58
38
|
requirement: !ruby/object:Gem::Requirement
|
@@ -103,7 +83,6 @@ rubyforge_project:
|
|
103
83
|
rubygems_version: 2.2.2
|
104
84
|
signing_key:
|
105
85
|
specification_version: 4
|
106
|
-
summary: A SimplePubSub client for publishing
|
107
|
-
of code.
|
86
|
+
summary: A SimplePubSub client for publishing messages in 1 line of code.
|
108
87
|
test_files: []
|
109
88
|
has_rdoc:
|
metadata.gz.sig
CHANGED
Binary file
|