aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/test/subscription_adapter/common.rb
Commit message (Collapse)AuthorAgeFilesLines
* Add `Style/EmptyLines` in `.rubocop.yml` and remove extra empty linesRyuta Kamizono2016-08-071-2/+0
|
* applies new string literal convention in actioncable/testXavier Noria2016-08-061-32/+32
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Cable message encodingJeremy Daer2016-03-311-2/+1
| | | | | | | | | | | | | | | | | | | * Introduce a connection coder responsible for encoding Cable messages as WebSocket messages, defaulting to `ActiveSupport::JSON` and duck- typing to any object responding to `#encode` and `#decode`. * Consolidate encoding responsibility to the connection. No longer explicitly JSON-encode from channels or other sources. Pass Cable messages as Hashes to `#transmit` and rely on it to encode. * Introduce stream encoders responsible for decoding pubsub messages. Preserve the currently raw encoding, but make it easy to use JSON. Same duck type as the connection encoder. * Revert recent data normalization/quoting (#23649) which treated `identifier` and `data` values as nested JSON objects rather than as opaque JSON-encoded strings. That dealt us an awkward hand where we'd decode JSON stringsā€¦ or not, but always encode as JSON. Embedding JSON object values directly is preferably, no extra JSON encoding, but that should be a purposeful protocol version change rather than ambiguously, inadvertently supporting multiple message formats.
* Support faye-websocket + EventMachine as an optionMatthew Draper2016-03-021-0/+1
|
* Don't rely on the global server as a receiver.Kasper Timm Hansen2016-02-141-6/+0
| | | | | | | | | | | | | | | | The `WorkerTest`'s `Receiver` is imporsonating an `ActionCable::Connection::Base`, but just delegates the logger to `ActionCable.logger`. This creates a mismatch as the connection requires the logger to be a `TaggedLoggerProxy`'ied logger, while the server doesn't. Thus to ensure an exception isn't raised when the worker tries to call `tag` other tests have to assign a proxied logger to their test server. Instead of forcing change on other tests, have Receiver adhere to the connection contract and use a `TaggedLoggerProxy`. As a consequence remove more setup from the tests.
* Default connection class to ActionCable::Connection::Base.Kasper Timm Hansen2016-02-141-8/+0
| | | | | | | Instead of depending on ApplicationCable::Connection being defined at initialize we should inject it in the Railtie. Thus we can kill more setup in the tests too.
* Inject Rails' channel paths in engine.Kasper Timm Hansen2016-02-141-8/+0
| | | | | | | | | | | | | We were explicitly referencing Rails.root in ActionCable::Server::Configuration.initialize, thereby coupling ourselves to Rails. Instead add `app/channels` to Rails' app paths and assign the existent files to `channel_paths`. Users can still append to those load paths with `<<` and `push` in `config/application.rb`. This means we can remove the custom `Dir` lookup in `channel_paths` and the Rails and root definitions in the tests.
* Revert "Revert "Eliminate the EventMachine dependency""Matthew Draper2016-01-301-3/+0
|
* Revert "Eliminate the EventMachine dependency"David Heinemeier Hansson2016-01-271-0/+3
|
* Ditch the EM error logging helperMatthew Draper2016-01-241-1/+0
| | | | | | We're no longer doing our work in the EM event loop, so errors are quite unlikely, and if they do occur, they're not really our responsibility to handle.
* Using a hacked faye-websocket, drop EventMachineMatthew Draper2016-01-241-2/+0
|
* Add tests for the ActionCable adaptersMatthew Draper2016-01-241-0/+142