real_time_rails 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -15,7 +15,7 @@ During an update to an active record object, the websocket server gets a notice
15
15
  Disclaimer
16
16
  ----------
17
17
 
18
- All source code at this point is to portray ideas to further cooperative design. It is not ready for use nor tested for validity.
18
+ All source code at this point is to portray ideas to further cooperative design. It is not ready for production use nor tested for validity.
19
19
 
20
20
  Beta Usage
21
21
  ----------
@@ -40,6 +40,8 @@ then in your view that you want a real time update. At this point partial paths
40
40
  History
41
41
  ----------
42
42
 
43
+ 0.0.6 Firefox changed socket name to MozWebSocket, added code to handle this.
44
+
43
45
  0.0.5 Added delete updates
44
46
 
45
47
  0.0.4 Adding RealTimeRails server executable. start it with "real\_time_rails"
data/bin/real_time_rails CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
- # to start the server just run "ruby websocket_server.rb"
2
+ # to start the server just run "real_time_rails"
3
3
 
4
4
  require 'em-websocket'
5
5
  require 'json'
@@ -84,7 +84,8 @@ module RealTimeRails
84
84
  # Adds the wrapper for creating the connection to the websocket server as well as registering for the correct channel on the server.
85
85
  def js_start_websocket
86
86
  "
87
- ws_#{@id} = new WebSocket('ws://localhost:8080');
87
+ var Socket = \"MozWebSocket\" in window ? MozWebSocket : WebSocket;
88
+ ws_#{@id} = new Socket('ws://localhost:8080');
88
89
  ws_#{@id}.onmessage = function(evt) {
89
90
  if(evt.data=='update'){real_time_update_#{@id}()};
90
91
  if(evt.data=='delete'){real_time_delete_#{@id}()};
@@ -1,5 +1,5 @@
1
1
  module RealTimeRails
2
2
 
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
 
5
5
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: real_time_rails
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.5
5
+ version: 0.0.6
6
6
  platform: ruby
7
7
  authors:
8
8
  - Kelly Mahan
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-27 00:00:00 -05:00
13
+ date: 2011-10-26 00:00:00 -05:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -81,7 +81,7 @@ requirements:
81
81
  - em-websocket
82
82
  - json
83
83
  rubyforge_project: real_time_rails
84
- rubygems_version: 1.5.2
84
+ rubygems_version: 1.6.2
85
85
  signing_key:
86
86
  specification_version: 3
87
87
  summary: A gem to enable seamless websocket integration with rails.