19 Apr '12, 11pm

#260 Messaging with Faye - RailsCasts

faye.ru require 'faye' require File.expand_path('../config/initializers/faye_token.rb', __FILE__) class ServerAuth def incoming(message, callback) if message['channel'] !~ %r{^/meta/} if message['ext']['auth_token'] != FAYE_TOKEN message['error'] = 'Invalid authentication token' end end callback.call(message) end end faye_server = Faye::RackAdapter.new(:mount => '/faye', :timeout => 45) faye_server.add_extension(ServerAuth.new) run faye_server require 'faye' require File.expand_path('../config/initializers/faye_token.rb', __FILE__) class ServerAuth def incoming(message, callback) if message['channel'] !~ %r{^/meta/} if message['ext']['auth_token'] != FAYE_TOKEN message['error'] = 'Invalid authentication token' end end callback.call(message) end end faye_server = Faye::RackAdapter.new(:mount => '/faye', :timeout => 45) faye_server.add_extension(ServerAuth.new) run faye_server

Full article: http://railscasts.com/episodes/260-messaging-with-faye?au...

Tweets

@MLiebreich on shale gas, why @Opower needs more ambition, coherant messaging and more.

@MLiebreich on shale gas, why @Opower needs mor...

renewableenergymagazine.com 19 Apr '12, 9am

Speak to Liebreich for an extended period, and you sense that his is a kind of quantum existence in which he straddles the...

Watching OmniAuth Part 1 on RailsCasts via @rai...

railscasts.com 19 Apr '12, 6pm

<% title "Sign In" %> <% if @authentications %> <% unless @authentications.empty? %> <p><strong>You can sign in to this ac...

Wohoo! Got the Login with Twitter to finally wo...

railscasts.com 19 Apr '12, 6pm

Some things have changed since OmniAuth version 1.0 was released. Each provider is now a separate gem that should be inclu...