sinatra-rocketio 0.0.6 → 0.0.7
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-rocketio/rocketio.rb +10 -2
- data/lib/sinatra-rocketio/version.rb +1 -1
- data/sample/Gemfile +2 -2
- data/sample/Gemfile.lock +4 -4
- data/sinatra-rocketio.gemspec +2 -2
- metadata +5 -5
data/History.txt
CHANGED
@@ -2,8 +2,16 @@ module Sinatra
|
|
2
2
|
module RocketIO
|
3
3
|
|
4
4
|
def self.push(type, data, opt={})
|
5
|
-
|
6
|
-
|
5
|
+
if options[:websocket]
|
6
|
+
if !opt[:to] or Sinatra::WebSocketIO.sessions.include? opt[:to]
|
7
|
+
Sinatra::WebSocketIO.push type, data, opt
|
8
|
+
end
|
9
|
+
end
|
10
|
+
if options[:comet]
|
11
|
+
if !opt[:to] or Sinatra::CometIO.sessions.include? opt[:to]
|
12
|
+
Sinatra::CometIO.push type, data, opt
|
13
|
+
end
|
14
|
+
end
|
7
15
|
end
|
8
16
|
|
9
17
|
def self.sessions
|
data/sample/Gemfile
CHANGED
data/sample/Gemfile.lock
CHANGED
@@ -36,7 +36,7 @@ GEM
|
|
36
36
|
rack (~> 1.4)
|
37
37
|
rack-protection (~> 1.3)
|
38
38
|
tilt (~> 1.3, >= 1.3.3)
|
39
|
-
sinatra-cometio (0.3.
|
39
|
+
sinatra-cometio (0.3.7)
|
40
40
|
event_emitter (>= 0.2.3)
|
41
41
|
eventmachine (>= 1.0.0)
|
42
42
|
httparty (>= 0.10.2)
|
@@ -51,7 +51,7 @@ GEM
|
|
51
51
|
rack-test
|
52
52
|
sinatra (~> 1.3.0)
|
53
53
|
tilt (~> 1.3)
|
54
|
-
sinatra-websocketio (0.1.
|
54
|
+
sinatra-websocketio (0.1.5)
|
55
55
|
em-websocket (>= 0.5.0)
|
56
56
|
em-websocket-client (>= 0.1.1)
|
57
57
|
event_emitter (>= 0.2.3)
|
@@ -78,6 +78,6 @@ DEPENDENCIES
|
|
78
78
|
rack
|
79
79
|
sass
|
80
80
|
sinatra
|
81
|
-
sinatra-cometio (>= 0.3.
|
82
|
-
sinatra-websocketio (>= 0.1.
|
81
|
+
sinatra-cometio (>= 0.3.7)
|
82
|
+
sinatra-websocketio (>= 0.1.5)
|
83
83
|
thin
|
data/sinatra-rocketio.gemspec
CHANGED
@@ -20,6 +20,6 @@ Gem::Specification.new do |gem|
|
|
20
20
|
gem.add_dependency "eventmachine", ">= 1.0.0"
|
21
21
|
gem.add_dependency "event_emitter", ">= 0.2.3"
|
22
22
|
gem.add_dependency "sinatra-contrib", ">= 1.3.2"
|
23
|
-
gem.add_dependency "sinatra-cometio", ">= 0.3.
|
24
|
-
gem.add_dependency "sinatra-websocketio", ">= 0.1.
|
23
|
+
gem.add_dependency "sinatra-cometio", ">= 0.3.7"
|
24
|
+
gem.add_dependency "sinatra-websocketio", ">= 0.1.5"
|
25
25
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-rocketio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
requirements:
|
99
99
|
- - ! '>='
|
100
100
|
- !ruby/object:Gem::Version
|
101
|
-
version: 0.3.
|
101
|
+
version: 0.3.7
|
102
102
|
type: :runtime
|
103
103
|
prerelease: false
|
104
104
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -106,7 +106,7 @@ dependencies:
|
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version: 0.3.
|
109
|
+
version: 0.3.7
|
110
110
|
- !ruby/object:Gem::Dependency
|
111
111
|
name: sinatra-websocketio
|
112
112
|
requirement: !ruby/object:Gem::Requirement
|
@@ -114,7 +114,7 @@ dependencies:
|
|
114
114
|
requirements:
|
115
115
|
- - ! '>='
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.1.
|
117
|
+
version: 0.1.5
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
requirements:
|
123
123
|
- - ! '>='
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: 0.1.
|
125
|
+
version: 0.1.5
|
126
126
|
description: WebSocket/Comet IO plugin for Sinatra
|
127
127
|
email:
|
128
128
|
- hashimoto@shokai.org
|