tristandunn / pusher-fake

A fake Pusher server for development and testing.
https://rubygems.org/gems/pusher-fake
MIT License
173 stars 32 forks source link

Added support for batch trigger events #48

Closed Tybot204 closed 7 years ago

Tybot204 commented 7 years ago

Pusher supports sending batch events since version 1.1.0 of their Ruby gem. I added in an endpoint for the fake server so that Rails applications can make use of this in testing.

See the API documentation.

tristandunn commented 7 years ago

Awesome! Thanks for the work. Let me know when it's finished and I'll try to get it merged as soon as possible.

Also, I fixed the Rubocop issue in master if you want to rebase.

Tybot204 commented 7 years ago

@tristandunn I think this is ready now. Couple other things to note: 1) The Pusher API docs say their endpoints for events and batch events allow "channel" (singular) to be used in place of "channels". I added a conditional assignment to both fake emitters to handle that case here. 2) My tests are all passing locally, yet 2 of them fail on Travis CI. Is this a configuration problem with Travis? It looks like capybara-webkit is having trouble connecting.

tristandunn commented 7 years ago
  1. Nice, thanks.
  2. Yeah, they fail on CI sometimes. I've just never got around to figuring out why. They usually pass if you re-run them once or twice.

Thanks again!

tristandunn commented 7 years ago

@Tybot204 Just released v1.7.0 with this in it, if you're looking to use it.

Tybot204 commented 7 years ago

Awesome, thank you! Updating my gems right now.