sinatra-websocketio 0.3.9 → 0.4.0

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: 13eda4c825b371bc35c926c3c8c2d58ea64ab0b6
4
- data.tar.gz: 6c2158b2c71090454325b0e28e96127d4103cd3e
3
+ metadata.gz: 0c6c4b999cc5f41c0d7b92d13210c4ffe23c4d00
4
+ data.tar.gz: 4e242742fecca0a5fb5559ff3474221c6c134582
5
5
  SHA512:
6
- metadata.gz: b481fd4eee043638c155713fec3e0e9231e35b3928d4da6db1559baeea46768f6b66d8d55f4bd03d78a7ab408950ed2e030a0dcddeda6972b197c33dc1c8cbca
7
- data.tar.gz: e7b4ed7eb18a179119bfe034a6278e6e4d9e85ceecadda4afc78b03deb504e8fc0137cd55eea5daba20f110e937c3a87ea2517ce9e54f812242d97f759a154b6
6
+ metadata.gz: f2ef63db595352e7ea52a40e7798e4317e298502a30921ff033333b9b6977da2a4e54fd10a026dd2034d88d391f05d5984aaf3246f923d09242ae622cad1d8e5
7
+ data.tar.gz: a579d3cccba11b9cd7a5ebb9b29a31809e774cdbbeb7097b2147b0c29a970da52c32d22ec07ba1e290436bab81bce9b470f92152503e3317c1dd7f77a300ad19
@@ -1,3 +1,7 @@
1
+ === 0.4.0 2013-10-04
2
+
3
+ * bugfix of message push
4
+
1
5
  === 0.3.9 2013-10-03
2
6
 
3
7
  * bugfix
@@ -1,5 +1,5 @@
1
1
  module Sinatra
2
2
  module WebSocketIO
3
- VERSION = "0.3.9"
3
+ VERSION = "0.4.0"
4
4
  end
5
5
  end
@@ -54,7 +54,8 @@ module Sinatra
54
54
  end
55
55
 
56
56
  def self.push(type, data, opt={})
57
- if opt.include? :to and self.sessions.include? opt[:to]
57
+ if opt.include? :to
58
+ return unless self.sessions.include? opt[:to]
58
59
  s = self.sessions[opt[:to]][:websocket]
59
60
  begin
60
61
  s.send({:type => type, :data => data}.to_json)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-websocketio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sho Hashimoto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-03 00:00:00.000000000 Z
11
+ date: 2013-10-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler