Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 28 lines (20 sloc) 0.848 kb
f7265e9 @HashNuke Initial commit with dependencies and dev tools setup along with a devise...
HashNuke authored
1 # This file is used by Rack-based servers to start the application.
2
3 require ::File.expand_path('../config/environment', __FILE__)
064341d @HashNuke Adds thin and sets up Faye in config.ru
HashNuke authored
4 require 'faye'
ec9b415 @HashNuke Adds user notifications, basic Kandan.Data APIs and some other re-organi...
HashNuke authored
5 require ::File.expand_path("../lib/active_users.rb", __FILE__)
6 require ::File.expand_path("../lib/faye_extensions/devise_auth.rb", __FILE__)
2ed6093 @HashNuke Working chat app with jQuery tabs and Backbone. Adds a small chat postin...
HashNuke authored
7
57eeced @sgrove Bumps the faye disconnect to 30 seconds to prevent errant drops
sgrove authored
8 faye_server = Faye::RackAdapter.new(:mount => "/faye", :timeout => 30)
2ed6093 @HashNuke Working chat app with jQuery tabs and Backbone. Adds a small chat postin...
HashNuke authored
9 faye_server.add_extension(DeviseAuth.new)
064341d @HashNuke Adds thin and sets up Faye in config.ru
HashNuke authored
10
11 # TODO send pull request to faye to get this fixed
12 # by adding a rack_prefix option
13 # which should then make the faye server object available
14 # via the get_client() method on the server
15
16 FAYE_CLIENT = faye_server.get_client
17
cbb4f4f @HashNuke Changes APIs to fix active users. Listen to unsubscribe instead of disco...
HashNuke authored
18 faye_server.bind(:unsubscribe) do |client_id|
ec9b415 @HashNuke Adds user notifications, basic Kandan.Data APIs and some other re-organi...
HashNuke authored
19 ActiveUsers.remove_by_client_id(client_id)
064341d @HashNuke Adds thin and sets up Faye in config.ru
HashNuke authored
20 end
21
22 run Rack::URLMap.new({
23 "/remote" => faye_server,
24 "/" => Kandan::Application
25 })
26
27 # run Kandan::Application
Something went wrong with that request. Please try again.