Permalink
Browse files

Should work without Rack, closes #33

  • Loading branch information...
mloughran committed Feb 3, 2013
1 parent d780130 commit ee64a7716478e5bdea020bef99f0650d480815fa
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/pusher/webhook.rb
View
@@ -30,7 +30,8 @@ class WebHook
#
def initialize(request, client = Pusher)
@client = client
- if request.kind_of?(Rack::Request)
+ # Should work without Rack
+ if defined?(Rack::Request) && request.kind_of?(Rack::Request)
@key = request.env['HTTP_X_PUSHER_KEY']
@signature = request.env["HTTP_X_PUSHER_SIGNATURE"]
@content_type = request.content_type

0 comments on commit ee64a77

Please sign in to comment.