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 CHANGED
@@ -1,3 +1,7 @@
1
+ === 0.0.7 2013-03-19
2
+
3
+ * not push to unexist client
4
+
1
5
  === 0.0.6 2013-03-19
2
6
 
3
7
  * update event_emitter.js v0.0.7
@@ -2,8 +2,16 @@ module Sinatra
2
2
  module RocketIO
3
3
 
4
4
  def self.push(type, data, opt={})
5
- Sinatra::CometIO.push type, data, opt if options[:comet]
6
- Sinatra::WebSocketIO.push type, data, opt if options[:websocket]
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
@@ -1,5 +1,5 @@
1
1
  module Sinatra
2
2
  module RocketIO
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  end
5
5
  end
data/sample/Gemfile CHANGED
@@ -5,7 +5,7 @@ gem 'rack'
5
5
  gem 'sinatra'
6
6
  gem 'thin'
7
7
  gem 'event_emitter'
8
- gem 'sinatra-cometio', '>= 0.3.6'
9
- gem 'sinatra-websocketio', '>= 0.1.4'
8
+ gem 'sinatra-cometio', '>= 0.3.7'
9
+ gem 'sinatra-websocketio', '>= 0.1.5'
10
10
  gem 'haml'
11
11
  gem 'sass'
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.6)
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.4)
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.6)
82
- sinatra-websocketio (>= 0.1.4)
81
+ sinatra-cometio (>= 0.3.7)
82
+ sinatra-websocketio (>= 0.1.5)
83
83
  thin
@@ -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.6"
24
- gem.add_dependency "sinatra-websocketio", ">= 0.1.4"
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.6
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.6
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.6
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.4
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.4
125
+ version: 0.1.5
126
126
  description: WebSocket/Comet IO plugin for Sinatra
127
127
  email:
128
128
  - hashimoto@shokai.org