pusher/pusher-ruby-client — pull request #8 by jrozner (2013-02-23 04:20:37+00:00)
Title: Fix ping/pong

There was no explicit ping event bound on the socket so when the normal event handler attempted parse the nil message JSON.parse failed.

Before:
Dispatching callbacks for pusher:ping
No callbacks to dispatch for pusher:ping
No global callbacks to dispatch for pusher:ping
Pusher : event received : channel: ; event: pusher:ping
#
Pusher : data attribute not valid JSON - you may wish to implement your own Pusher::Client.parser
rake aborted!

After:
Dispatching callbacks for pusher:ping
Pusher : sending event : {"event":"pusher:pong","data":null}
No global callbacks to dispatch for pusher:ping
Pusher : event received : channel: ; event: pusher:ping