Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rack dependency #33

Closed
oriolgual opened this issue Jan 10, 2013 · 2 comments
Closed

Rack dependency #33

oriolgual opened this issue Jan 10, 2013 · 2 comments

Comments

@oriolgual
Copy link

Right now Rack is declared as a development dependency but Pusher::WebHook uses Rack::Request here.

There are two solutions: add Rack as a dependency or (better IMO) change the if to something that just checks if the given object quacks like a Rack::Request.

What do you think?

@mloughran
Copy link
Contributor

Yes this is a good point. We use rather a lot of methods to check for all those quacks, how about something like this?

if defined?(Rack::Request) && request.kind_of?(Rack::Request)

@oriolgual
Copy link
Author

Works for me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants