sinatra-cometio 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +4 -0
- data/lib/sinatra-cometio/cometio.rb +6 -5
- data/lib/sinatra-cometio/version.rb +1 -1
- metadata +4 -4
data/History.txt
CHANGED
@@ -27,7 +27,8 @@ module Sinatra
|
|
27
27
|
end
|
28
28
|
|
29
29
|
def self.push(type, data, opt={})
|
30
|
-
if opt.include? :to
|
30
|
+
if opt.include? :to
|
31
|
+
return unless self.sessions.include? opt[:to]
|
31
32
|
s = self.sessions[opt[:to]]
|
32
33
|
if s[:queue].empty? and s[:stream] != nil
|
33
34
|
begin
|
@@ -41,10 +42,10 @@ module Sinatra
|
|
41
42
|
else
|
42
43
|
s[:queue].push :type => type, :data => data
|
43
44
|
end
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
45
|
+
return
|
46
|
+
end
|
47
|
+
self.sessions.keys.each do |id|
|
48
|
+
push type, data, :to => id
|
48
49
|
end
|
49
50
|
end
|
50
51
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-cometio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-03-
|
12
|
+
date: 2013-03-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -255,7 +255,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
255
255
|
version: '0'
|
256
256
|
segments:
|
257
257
|
- 0
|
258
|
-
hash:
|
258
|
+
hash: 2224878140655385903
|
259
259
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
260
260
|
none: false
|
261
261
|
requirements:
|
@@ -264,7 +264,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
264
264
|
version: '0'
|
265
265
|
segments:
|
266
266
|
- 0
|
267
|
-
hash:
|
267
|
+
hash: 2224878140655385903
|
268
268
|
requirements: []
|
269
269
|
rubyforge_project:
|
270
270
|
rubygems_version: 1.8.24
|