simplepubsub 1.2.2 → 1.2.3
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 +1 -2
- data/lib/simplepubsub.rb +6 -5
- metadata +19 -19
- 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: 5f36ec32273a0f8bd501ed28e40289c8c8711736
|
4
|
+
data.tar.gz: ce1167bd984860112ad35e8a140692a49ab0c38b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dfa9045634ba126461a286d333a835c58f091cddb1dd76eb02342db9b7dfd0d2cecaec146ec0842bee57c0715ef014aeebf9499e2a4b9b4de3717366e5522003
|
7
|
+
data.tar.gz: 0fb20abdd3dce87bb4b27c5cfbe2cd53948485bfa1173d71e073cd38dcf595ce44e2a7eae9a1506ef1639e131c779ab7a33bf5a6220c133f9642a61c9332d8bd
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
��v
|
2
|
-
}�8�?g����1��/��Rg���95��ZME%єg��uY�e��/J���x��~�������)�@^B��� WV)�F&�I��fT3&����D3J2Og]N8o�*��բ0��'�H~����j�����j˪Ml�����>�7�#��!
|
1
|
+
��������¯���-TE��7@�`�XL����p�v��M.����_h^��,�?n�}0pg�7ck�:��}("�|-H`�y\l��Z��R�u�W����M�=�w3r4��TwɎC˅Lh�n���*5��G\p��|7+s;a"�-�[UKB"Sl�8��Vs��D�\��BLN 6���Y��t랑�%i��x_�0�(U��5�3Av�D���7��@�yM��'vƚ^0��� ���̑���":�*�
|
data/lib/simplepubsub.rb
CHANGED
@@ -9,6 +9,7 @@ require 'xml-registry'
|
|
9
9
|
module SimplePubSub
|
10
10
|
|
11
11
|
class Broker
|
12
|
+
|
12
13
|
|
13
14
|
def self.start(host: '0.0.0.0', port: 59000)
|
14
15
|
|
@@ -36,7 +37,7 @@ module SimplePubSub
|
|
36
37
|
if a.first == 'subscribe to topic' then
|
37
38
|
|
38
39
|
topic = a.last.rstrip.gsub('+','*')\
|
39
|
-
.gsub('#','*//').gsub('
|
40
|
+
.gsub('#','*//').gsub(/\bor/,'|')
|
40
41
|
subscribers[topic] ||= []
|
41
42
|
subscribers[topic] << ws
|
42
43
|
|
@@ -51,8 +52,7 @@ module SimplePubSub
|
|
51
52
|
current_topic, message = a
|
52
53
|
|
53
54
|
if not current_topic[0] == '/' and \
|
54
|
-
not current_topic =~ /[^a-zA-Z0-9\/_ ]$/ then
|
55
|
-
|
55
|
+
not current_topic =~ /[^a-zA-Z0-9\/_ ]$/ then
|
56
56
|
begin
|
57
57
|
|
58
58
|
reg = XMLRegistry.new
|
@@ -60,13 +60,14 @@ module SimplePubSub
|
|
60
60
|
|
61
61
|
rescue
|
62
62
|
puts 'simplepubsub.rb warning: ' + ($!).inspect
|
63
|
-
end
|
63
|
+
end
|
64
64
|
|
65
65
|
subscribers.each do |topic,conns|
|
66
66
|
|
67
67
|
xpath = topic.split('/')\
|
68
68
|
.map {|x| x.to_i.to_s == x ? x.prepend('x') : x}\
|
69
69
|
.join('/')
|
70
|
+
|
70
71
|
node = reg.doc.root.xpath xpath.sub(/\S\b$/,'\0/text()')
|
71
72
|
|
72
73
|
if node.any? then
|
@@ -101,4 +102,4 @@ if __FILE__ == $0 then
|
|
101
102
|
|
102
103
|
SimplePubSub::Broker.start
|
103
104
|
|
104
|
-
end
|
105
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplepubsub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -12,26 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|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
26
|
+
c3RlckBqYW1lc3JvYmVydHNvbi5ldTANBgkqhkiG9w0BAQUFAAOCAQEAV0+UtJbL
|
27
|
+
lVo3SyBLnII029oj6aW49Bkp+tNTSnGTtttT4BtGNFWN/lg3A2taJs22IXTul3vh
|
28
|
+
M93fJ8jA0zf4g2aSHYWIiarZuts+9uH+H+MTMJneSJGya6wJ8HprnZnK2D5ZZIHW
|
29
|
+
iFEKNhBnwmRzkL2zB1Vx9sxLZeISU8wIva/uLnUO01gBzK8/gfNI6HIIs2AkF7dG
|
30
|
+
xANiMfbsLQWR8Tfw/TL+BdLwnNUku7FcXpIxFavJzDXMIQmfSzvMvjyjptSqS9j9
|
31
|
+
ESZzN7k2ND/MlTmSRterWKMTHfqcRezLMwpCUfuiwqBZjmitwfxLISVSb6KbdmAP
|
32
|
+
gwvxzXnCp16BVQ==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
34
|
+
date: 2017-03-13 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: websocket-eventmachine-server
|
@@ -74,7 +74,7 @@ dependencies:
|
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: 0.2.3
|
76
76
|
description:
|
77
|
-
email: james@
|
77
|
+
email: james@jamesrobertson.eu
|
78
78
|
executables: []
|
79
79
|
extensions: []
|
80
80
|
extra_rdoc_files: []
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
102
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.
|
103
|
+
rubygems_version: 2.6.8
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: The SimplePubSub gem is a messaging broker which uses Eventmachine + websockets.
|
metadata.gz.sig
CHANGED
Binary file
|