websocket-rails 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +8 -0
- data/lib/assets/javascripts/websocket_rails/http_connection.js.coffee +1 -1
- data/lib/rails/app/controllers/websocket_rails/delegation_controller.rb +13 -0
- data/{config → lib/rails/config}/routes.rb +0 -0
- data/lib/websocket_rails/connection_adapters.rb +1 -1
- data/lib/websocket_rails/engine.rb +8 -8
- data/lib/websocket_rails/version.rb +1 -1
- data/spec/dummy/log/test.log +1 -0
- metadata +5 -4
data/README.md
CHANGED
@@ -4,6 +4,14 @@
|
|
4
4
|
|
5
5
|
If you haven't done so yet, check out the [Project Page](http://danknox.github.com/websocket-rails/) to get a feel for the project direction. Feedback is very much appreciated. Post an issue on the issue tracker or [shoot us an email](mailto://support@threedotloft.com) to give us your thoughts.
|
6
6
|
|
7
|
+
## IMPORTANT NOTE
|
8
|
+
|
9
|
+
Not sure what happened when I released last night, but version 0.1.6 is
|
10
|
+
currently broken if you download it from Rubygems. Please use `gem
|
11
|
+
'websocket-rails', :git =>
|
12
|
+
'git://github.com/DanKnox/websocket-rails.git'` in your Gemfile until I
|
13
|
+
resolve the broken package.
|
14
|
+
|
7
15
|
## Update July 17 2012
|
8
16
|
|
9
17
|
We just released a new version containing significant new functionality.
|
@@ -32,7 +32,7 @@ class WebSocketRails.HttpConnection
|
|
32
32
|
if @_conn.readyState == 3
|
33
33
|
data = @_conn.responseText.substring @last_pos
|
34
34
|
@last_pos = @_conn.responseText.length
|
35
|
-
data = data.replace
|
35
|
+
data = data.replace( /\]\]\[\[/g, "],[" )
|
36
36
|
decoded_data = JSON.parse data
|
37
37
|
@dispatcher.new_message decoded_data
|
38
38
|
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module WebsocketRails
|
2
|
+
# This class provides a means for accessing the Rails
|
3
|
+
# controller helper methods defined in a user's application
|
4
|
+
# or in gems that the user has added to the project.
|
5
|
+
#
|
6
|
+
# Each active connection creates and stores it's own
|
7
|
+
# instance with the correct @_request and @_env objects
|
8
|
+
# set. WebsocketRails::BaseController sends missing
|
9
|
+
# methods to the active connection's delegation controller
|
10
|
+
# instance.
|
11
|
+
class DelegationController < ApplicationController
|
12
|
+
end
|
13
|
+
end
|
File without changes
|
@@ -34,7 +34,7 @@ module WebsocketRails
|
|
34
34
|
@queue = EventQueue.new
|
35
35
|
@dispatcher = dispatcher
|
36
36
|
@connected = true
|
37
|
-
@delegate = DelegationController.new
|
37
|
+
@delegate = WebsocketRails::DelegationController.new
|
38
38
|
@delegate.instance_variable_set(:@_env,request.env)
|
39
39
|
@delegate.instance_variable_set(:@_request,request)
|
40
40
|
start_ping_timer
|
@@ -1,12 +1,12 @@
|
|
1
1
|
module WebsocketRails
|
2
|
-
|
2
|
+
|
3
3
|
class Engine < Rails::Engine
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
|
5
|
+
config.autoload_paths += [File.expand_path("../../lib", __FILE__)]
|
6
|
+
|
7
|
+
paths["app"] << "lib/rails/app"
|
8
|
+
paths["app/controllers"] << "lib/rails/app/controllers"
|
9
|
+
paths["config/routes"] << "lib/rails/config/routes.rb"
|
10
|
+
|
11
11
|
end
|
12
12
|
end
|
data/spec/dummy/log/test.log
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: websocket-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -125,6 +125,8 @@ files:
|
|
125
125
|
- lib/assets/javascripts/websocket_rails/websocket_rails.js.coffee
|
126
126
|
- lib/generators/websocket_rails/install/install_generator.rb
|
127
127
|
- lib/generators/websocket_rails/install/templates/events.rb
|
128
|
+
- lib/rails/app/controllers/websocket_rails/delegation_controller.rb
|
129
|
+
- lib/rails/config/routes.rb
|
128
130
|
- lib/websocket-rails.rb
|
129
131
|
- lib/websocket_rails/base_controller.rb
|
130
132
|
- lib/websocket_rails/channel.rb
|
@@ -142,7 +144,6 @@ files:
|
|
142
144
|
- lib/websocket_rails/internal_events.rb
|
143
145
|
- lib/websocket_rails/logging.rb
|
144
146
|
- lib/websocket_rails/version.rb
|
145
|
-
- config/routes.rb
|
146
147
|
- bin/thin-socketrails
|
147
148
|
- spec/dummy/app/controllers/application_controller.rb
|
148
149
|
- spec/dummy/app/controllers/chat_controller.rb
|
@@ -231,7 +232,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
231
232
|
version: '0'
|
232
233
|
segments:
|
233
234
|
- 0
|
234
|
-
hash:
|
235
|
+
hash: -1609185237032377191
|
235
236
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
236
237
|
none: false
|
237
238
|
requirements:
|
@@ -240,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
240
241
|
version: '0'
|
241
242
|
segments:
|
242
243
|
- 0
|
243
|
-
hash:
|
244
|
+
hash: -1609185237032377191
|
244
245
|
requirements: []
|
245
246
|
rubyforge_project: websocket-rails
|
246
247
|
rubygems_version: 1.8.19
|