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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3025823552811eddbad0d383fdbbba8f07e64561
4
- data.tar.gz: db4f640fc4910535e34e4aa72f66d39a40e43dc9
3
+ metadata.gz: 5f36ec32273a0f8bd501ed28e40289c8c8711736
4
+ data.tar.gz: ce1167bd984860112ad35e8a140692a49ab0c38b
5
5
  SHA512:
6
- metadata.gz: bcfb6000a19538946c2864b4469a5d1a4cbd1e6219fe87cc787ccd116f5ac92789d67c11b6dd2a34ccb14e49ac63b3e53e374e04b9b15be5a5d2c01f4f1569fe
7
- data.tar.gz: 3a9b958c75a7331d48f7511822b4db8bc42a8e0e16df3a0dfd10021ffbc19ee4c249fdb8e55deab32bc66a3cdf539031022f20eaf794af141f2ab80437beeae9
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����_Aaqd�8+6�T�����Z@���U�앎�YM�����#�aW���RC
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}0pg7ck�:��}("�|-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�3AvD���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('or','|')
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.2
4
+ version: 1.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -12,26 +12,26 @@ cert_chain:
12
12
  -----BEGIN CERTIFICATE-----
13
13
  MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBI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Uku7FcXpIxFavJzDXMIQmfSzvMvjyjptSqS9j9
31
+ ESZzN7k2ND/MlTmSRterWKMTHfqcRezLMwpCUfuiwqBZjmitwfxLISVSb6KbdmAP
32
+ gwvxzXnCp16BVQ==
33
33
  -----END CERTIFICATE-----
34
- date: 2016-07-26 00:00:00.000000000 Z
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@r0bertson.co.uk
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.5.1
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