space_elevator ActionCable Client for Ruby

I have an interactive command-line daemon (in Ruby) that I needed to receive push events via WebSockets from an ActionCable-enabled Rails application. I eventually succeeded, but doing so required diving into the weeds of ActionCable’s wire protocol since I didn’t want to rewrite my application in JavaScript solely to leverage the official client code.

Because I’m such a nice guy, I’ve extracted the code and released an easy-to-use client as the space_elevator gem. When combined with gems like thor, it makes writing bi-directional command line API clients a breeze. You can publish/subscribe to multiple channels simultaneously, and all in an event-driven manner. Check out the channel-y goodness and don’t forget to file any issues!

Leave a Reply

Your email address will not be published. Required fields are marked *