simplepubsub 1.1.1 → 1.1.2

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: 152bb69eb0bf3dc991ac403759914b3d31aec5b9
4
- data.tar.gz: 1f7ff0382b935defd332038ba4abed6c14b6d6e0
3
+ metadata.gz: b1645d664bb8d17df53546e410a8f3949dcafd45
4
+ data.tar.gz: 873640bc3f729fe73680bf4e0e1d03f7c476e92d
5
5
  SHA512:
6
- metadata.gz: 590a708af93ab9abff7c7cec380a48ede088a56874da707b4494b931d37849e71838abb2af46dafb15b63eb539f64d6234e6882057d5f2e1df6eac508cd8b81f
7
- data.tar.gz: 91f232f6e1a2ae225e51805400f8eb572b975f3cca646d5906247189eaf5de56291f61c351ef791c4254cfc7395396afa4edf2d477daf740773e7b1a18f972f4
6
+ metadata.gz: ddb62ee9595b7936bf9a5e16916c67800ee98f5800dee305c8eef39223ee4bf80b85acc59f3c5c66947ff6f319053a9c9858733eff6e5569507e89fbebb06286
7
+ data.tar.gz: 77e342c3f03f92ef2cc2a7c717f245f6299b357d9a1f410b2d491fd8ffefe7ee91f253f46a1ac7d41eb5779f379d1d1810844a65976893316651b52ebea9fbdb
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- l
2
- ��i�����4���=�!n vK�Mh���ɾ�ك��A(��h ����|�/�@�>巩ߝ
1
+ �Yc��m8������^M ���T����L���=�I�^��7�4��^�� ����Dj�q
2
+ 9M��680C~����>���9��M;�5`ց*7Ѻœ ��!o���
data.tar.gz.sig CHANGED
Binary file
data/lib/simplepubsub.rb CHANGED
@@ -36,7 +36,8 @@ module SimplePubSub
36
36
 
37
37
  if a.first == 'subscribe to topic' then
38
38
 
39
- topic = a.last.rstrip.gsub('+','*').gsub('#','//')
39
+ topic = a.last.rstrip.gsub('+','*')\
40
+ .gsub('#','*//').gsub('or','|')
40
41
  subscribers[topic] ||= []
41
42
  subscribers[topic] << ws
42
43
 
@@ -56,9 +57,9 @@ module SimplePubSub
56
57
 
57
58
  subscribers.each do |topic,conns|
58
59
 
59
- node = reg[topic]
60
+ node = reg.doc.root.xpath topic.gsub(/\S\b/,'\0/text()')
60
61
 
61
- if node and node.text.length >= 1 then
62
+ if node.any? then
62
63
  conns.each {|x| x.send current_topic + ': ' + message}
63
64
  end
64
65
 
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.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -31,7 +31,7 @@ cert_chain:
31
31
  i0PBE6fLwlIMk8jNNUcX3J1csSMgLNTwE8CwrlSZE8sueHj0pQzICM7lF0gGREO6
32
32
  hQHD0LljU3MusQ==
33
33
  -----END CERTIFICATE-----
34
- date: 2014-05-22 00:00:00.000000000 Z
34
+ date: 2014-06-03 00:00:00.000000000 Z
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: websocket-eventmachine-server
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  version: '0'
103
103
  requirements: []
104
104
  rubyforge_project:
105
- rubygems_version: 2.1.11
105
+ rubygems_version: 2.2.2
106
106
  signing_key:
107
107
  specification_version: 4
108
108
  summary: simplepubsub
metadata.gz.sig CHANGED
@@ -1,2 +1,3 @@
1
- �;�y���uۄ#ɥ�'��au�F���Z5k���@����3���W��� m,��9V›4+�P�� ,5C����Ͱ� ��@*v��/p�E� ����1��t���=%
2
- t[#��s�W ���寲ܕڄ:ՉL
1
+  ꯕ������ؽ�;�$���T��^~�iux��A
2
+ x���R�ܭ6Mܿ���N§5GWA�6��h�FU•b���r--���!�y ��άK� ���U�Oc�B��@�3k��axg�З�����}rN(����9-��rSŝ)�W)���
3
+ �ŔmF��o����ɾ�z���['�D~8��-K-��!Mu��YZV%��t�()�[��2�މ�A9 L! gI"A}����$�;~�2�>�� 0��