Commit Graph

389 Commits

Author SHA1 Message Date
James Coglan b8469386d5 Perform more stringent checks on request headers so that it should not be possible to get a driver for requests with invalid headers. 2017-10-30 23:48:13 +00:00
James Coglan 12d2aa8a80 Fix the version of Rubygems that Travis is using on Ruby 1.9. 0.7.0 2017-09-11 22:05:09 +01:00
James Coglan 222e93a01c Bump version to 0.7.0. 2017-09-11 22:00:08 +01:00
James Coglan bc03ce72fe Refactor the client examples, and get the TCPSocket one into a runnable state so it can be run from the command line with a URI. 2017-08-15 19:00:04 +01:00
James Coglan bed599ae32 Don't require rubygems, this has not been necessary since Ruby 1.8. 2017-08-08 23:41:48 +01:00
James Coglan d3aee30def Merge pull request #53 from izwick-schachter/master
Added TCPSocket client example
2017-08-08 23:30:14 +01:00
izwick-schachter 391c3d0426 Added TCPSocket client example 2017-08-08 13:44:08 -04:00
James Coglan 8739c7966f Rename tcp_server.rb to em_server.rb. 2017-08-08 08:55:13 +01:00
James Coglan 77e46d6fce Add an example EventMachine client. 2017-08-08 08:54:50 +01:00
James Coglan 06f215611e Flesh out the docs for the new ping/pong events. 2017-08-02 21:55:14 +01:00
James Coglan cd38349f9a Make the ping/pong tests check the content of the events. 2017-08-02 21:54:59 +01:00
James Coglan 5daa01be5e Emit ping and pong events after all other effects of those frames have been carried out. 2017-08-02 21:32:17 +01:00
James Coglan 1ea7205acf Merge pull request #51 from ably-forks/support-ping-in-event-emitter
Support ping in EventEmitter
2017-08-02 21:28:31 +01:00
James Coglan 7dba28caa2 Update Ruby versions in Travis config. 2017-08-01 20:34:39 +01:00
Matthew O'Riordan dacae81312 Update docs to reflect ping & pong events 2017-05-16 15:01:27 +01:00
Matthew O'Riordan f22c97f977 Emit :ping and :pong events in the driver 2017-05-16 15:00:10 +01:00
James Coglan 65c068b24d Merge pull request #50 from junaruga/feature/travis-ruby-head
Feature/travis ruby head
2017-04-14 10:32:59 +01:00
Jun Aruga cab7ae1b29 Update Ruby 2.3, 2.4 to latest version on Travis. 2017-04-03 19:31:18 +02:00
James Coglan 38b8f63f10 Bump version to 0.6.5. 0.6.5 2017-01-22 19:58:03 +00:00
James Coglan 2936754e81 Test on Ruby 2.4.0. 2016-12-29 11:30:09 +00:00
James Coglan 4fa9e19063 Merge pull request #48 from kbarrette/pure_ruby_masking
Pure Ruby masking
2016-12-27 15:07:32 +00:00
Keith Barrette cfc45f2360 Fall back to ruby 2016-12-07 11:32:43 -05:00
Keith Barrette 6e32ee04f3 Add Ruby mask implementation 2016-12-07 11:32:43 -05:00
James Coglan 568dc364a8 Bump Ruby versions 2.2 and 2.3 on Travis. 2016-11-21 23:22:52 +00:00
James Coglan 58cdc2305b Remove Rubinius from the build as it hasn't worked on Travis for weeks. 2016-10-26 09:14:02 +01:00
James Coglan 930bbe2020 Move the license text into a separate file. 2016-07-19 20:57:38 +01:00
James Coglan 673d11e436 Bump version to 0.6.4. 0.6.4 2016-05-20 08:46:06 +01:00
James Coglan 9ce857b3d4 Revise uses of encoding APIs.
When originally implemented, we still supported Ruby 1.8, which
necessitated checking for encoding methods and using a regex to validate
UTF-8. These checks are now gone.

We tagged many strings as binary when not strictly necessary, either
because we were just going to iterate their bytes or because we were
going to hand them off to the caller which should just write them
directly to a socket. Strings used as buffers to accumulate streaming
input are still tagged as binary to avoid encoding
collision/conversion.

The places where we do need to tag as UTF-8 (i.e. just before emitting
to the application) remain, but copy the string if necessary. This
allows us to work with frozen strings.

Finally, strings passed in via the Driver#text method should be
*transcoded* to UTF-8 if necessary, not merely tagged. The Ruby
String#encode method produces a new string so this should also be safe
with frozen strings.
2016-05-19 21:08:22 +01:00
James Coglan 115d82bebb Silence all -W2 warnings. 2016-05-18 22:42:16 +01:00
James Coglan 15ba7410c6 Remove some unused variables from Hybi#send_frame. 2016-05-18 22:33:33 +01:00
James Coglan ca9faf0ff4 Update Ruby versions for Travis. 2016-04-30 13:10:29 +01:00
James Coglan 188b7d897e Create CODE_OF_CONDUCT.md. 2015-11-08 12:16:43 +00:00
James Coglan d515dc0894 Bump version to 0.6.3. 0.6.3 2015-11-06 22:24:35 +00:00
James Coglan 4ae198b1d3 Throw a more helpful error if a client driver is created with an invalid URL. 2015-10-17 21:37:13 +01:00
James Coglan 3bf1ef1651 Update Rubies for Travis: 2.1.7, 2.2.3, jruby-9, rbx-2.5. 2015-10-17 13:20:36 +01:00
James Coglan 39824f5ace Silence C compiler warnings; use 'long' instead of 'int' for ruby string lengths. 2015-10-11 14:15:57 +01:00
James Coglan c63220194c Close the connection if a draft-76 client sends a Sec-WebSocket-Key header where the numeric value is a non-integer multiple of the number of spaces. 2015-10-02 21:32:35 +01:00
James Coglan 6b05bab4df Merge pull request #32 from amatsuda/warning
"warning: instance variable @delegate not initialized"
2015-09-18 06:45:07 -04:00
Akira Matsuda 5ce5c98339 "warning: instance variable @delegate not initialized" 2015-07-21 16:41:50 +09:00
James Coglan adfe771923 Bump version to 0.6.2. 0.6.2 2015-07-18 17:40:40 +01:00
James Coglan bc7d29cb52 Emit a protocol error when a closing frame has a 1-byte payload. 2015-07-17 22:02:51 +01:00
James Coglan 59940290c9 Emit close code 1000 if the closing frame does not contain one. 2015-07-16 08:19:05 +01:00
James Coglan 198a04a537 Bump version to 0.6.1. 0.6.1 2015-07-13 20:16:20 +01:00
James Coglan be2e5ed9ce A few stylistic tweaks. 2015-07-11 14:24:19 +01:00
James Coglan d461b0def5 Use symbols for events in the docs. 2015-07-10 21:27:01 +01:00
James Coglan d4245ed3f4 Rather than implementing integer (un)packing ourselves, use the Array#pack and String#unpack methods. 2015-07-10 20:05:19 +01:00
James Coglan 7128d1b030 Standardise the words used to refer to chunks of parser input. 2015-07-10 09:37:03 +01:00
James Coglan 75fe55eaba Adjust how on() calls add_listener(). This is necessary because faye-websocket overrides add_listener with one argument, so users with faye-websocket locked at < 0.10 will see errors. 2015-07-10 09:22:16 +01:00
James Coglan f1fd96e093 Emit an error event *after* setting the ready state to 3. 0.6.0 2015-07-08 20:13:50 +01:00
James Coglan 5764488603 Bump the version to 0.6.0. 2015-07-08 20:08:20 +01:00