sinatra-rocketio 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +4 -0
- data/lib/sinatra-rocketio/rocketio.rb +10 -4
- data/lib/sinatra-rocketio/version.rb +1 -1
- data/rocketio.js +1 -1
- data/rocketio.min.js +1 -1
- data/sinatra-rocketio.gemspec +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7d6fd962e14fc6929da8f5143c3ed8cd12776937
|
4
|
+
data.tar.gz: 6873e400995be6dcc7a2c3e8688fad3353db71f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 116c61a5dc8ddfa031af77263ebc1e4205604b6be1d8e13db64cef399843763fade524cd74d99161029548a208d16fccab202c1caa9d81446ff6dd2672042518
|
7
|
+
data.tar.gz: 13276fb030f0f526468a138b85d574bf48ac357ee1f7faf69082b6b6ae5b4a13c4bd58f93db4a5e2f89810df780df50debcf8bd2b1d210f9a471985725cc3e0d
|
data/History.txt
CHANGED
@@ -38,20 +38,26 @@ Sinatra::RocketIO.once :start do
|
|
38
38
|
if options[:comet]
|
39
39
|
Sinatra::CometIO.on :* do |event_name, *args|
|
40
40
|
event_name = :__connect if event_name == :connect
|
41
|
+
session_id = args.size > 1 ? args[1] : args[0]
|
42
|
+
address = sessions.include?(session_id) ? sessions[session_id][:remote_addr] : nil
|
43
|
+
info = Sinatra::RocketIO::ClientInfo.new(:session => session_id, :address => address, :channel => Sinatra::RocketIO.channels[session_id], :type => :comet)
|
41
44
|
if args.size > 1
|
42
|
-
Sinatra::RocketIO.emit event_name, args[0],
|
45
|
+
Sinatra::RocketIO.emit event_name, args[0], info
|
43
46
|
else
|
44
|
-
Sinatra::RocketIO.emit event_name,
|
47
|
+
Sinatra::RocketIO.emit event_name, info
|
45
48
|
end
|
46
49
|
end
|
47
50
|
end
|
48
51
|
if options[:websocket]
|
49
52
|
Sinatra::WebSocketIO.on :* do |event_name, *args|
|
50
53
|
event_name = :__connect if event_name == :connect
|
54
|
+
session_id = args.size > 1 ? args[1] : args[0]
|
55
|
+
address = sessions.include?(session_id) ? sessions[session_id][:remote_addr] : nil
|
56
|
+
info = Sinatra::RocketIO::ClientInfo.new(:session => session_id, :address => address, :channel => Sinatra::RocketIO.channels[session_id], :type => :websocket)
|
51
57
|
if args.size > 1
|
52
|
-
Sinatra::RocketIO.emit event_name, args[0],
|
58
|
+
Sinatra::RocketIO.emit event_name, args[0], info
|
53
59
|
else
|
54
|
-
Sinatra::RocketIO.emit event_name,
|
60
|
+
Sinatra::RocketIO.emit event_name, info
|
55
61
|
end
|
56
62
|
end
|
57
63
|
end
|
data/rocketio.js
CHANGED
data/rocketio.min.js
CHANGED
data/sinatra-rocketio.gemspec
CHANGED
@@ -26,7 +26,7 @@ Gem::Specification.new do |gem|
|
|
26
26
|
gem.add_development_dependency "json"
|
27
27
|
|
28
28
|
gem.add_dependency "sinatra-cometio", ">= 0.5.9"
|
29
|
-
gem.add_dependency "sinatra-websocketio", ">= 0.3.
|
29
|
+
gem.add_dependency "sinatra-websocketio", ">= 0.3.8"
|
30
30
|
gem.add_dependency "sinatra"
|
31
31
|
gem.add_dependency "eventmachine", ">= 1.0.0"
|
32
32
|
gem.add_dependency "event_emitter", ">= 0.2.5"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinatra-rocketio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
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-
|
11
|
+
date: 2013-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - '>='
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.3.
|
145
|
+
version: 0.3.8
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - '>='
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.3.
|
152
|
+
version: 0.3.8
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: sinatra
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -277,7 +277,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
277
277
|
version: '0'
|
278
278
|
requirements: []
|
279
279
|
rubyforge_project:
|
280
|
-
rubygems_version: 2.
|
280
|
+
rubygems_version: 2.1.5
|
281
281
|
signing_key:
|
282
282
|
specification_version: 4
|
283
283
|
summary: WebSocket/Comet IO plugin for Sinatra
|