Closed wjessop closed 6 years ago
OK, I've just seen that it seems that it is deliberate that em-http-request is not included in as a runtime dependency deliberately. There's two things that may be an issue here:
Any thoughts on the above?
OK, possible plan. A new Gem owned by pusher called "pusher-http-ruby-em" that does nothing but depend on both pusher-http-ruby, and em-http-request. That way people who want to use EM can depend on that one gem and get their deps resolved properly by bundler, and pusher can control bumping the version and dependent versions of em-http-request.
Thanks! As you noted, this gem does not include em-http-request
as a dependency, even though it uses it at runtime in some contexts. I believe this is by design, as not everyone is using EventMachine. There are some trade-offs, such as the required em-http-request
version not being managed - we could fix this by documenting supported versions of em-http-request
in the README.
Pusher require em-http-request:
https://github.com/pusher/pusher-http-ruby/blob/adf04980682264050e70b99dd39dc8b82af2390a/lib/pusher/client.rb#L377
but it is only specified as a development dependency meaning it is not installed when a bundle install is done in a project that includes it. This means em-http-request has to be explicitly added to the Gemfile of a project.
This PR changes it to a regular runtime dependency so Bundler knows about it and can install the correct version as required.