aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable
Commit message (Collapse)AuthorAgeFilesLines
...
* Prep Rails 5 beta 4eileencodes2016-04-272-1/+3
|
* Merge pull request #24669 from tomkadwill/action_pack_typosVipul A M2016-04-221-1/+1
|\ | | | | Actioncable and Actionpack documentation typos [ci skip]
| * Actioncable and Actionpack documentation typos [ci skip]Tom Kadwill2016-04-211-1/+1
| |
* | Log if redis connection is in stale/failed state.Vipul A M2016-04-211-0/+4
|/
* Cable: Extract stream handler constructionJeremy Daer2016-04-186-25/+75
| | | | | | | | * Use separate stream handler builders for easy override and testing. * Fix worker pool execution that was silently failing since it only expected connection receivers. Sparked by code in #24162.
* Cable: Periodic timers refreshJeremy Daer2016-04-184-39/+83
| | | | | | | | | * Rewrite docs * Support blocks in addition to method names and Proc args * Check for valid arguments * Convert `periodically :method_name` to Proc callbacks * Drop periodic runner methods from the worker pool * Ensure we clear active periodic timers after shutdown
* Merge pull request #24600 from tomkadwill/action-cabel-channel-typosVipul A M2016-04-184-5/+5
|\ | | | | Fix typos in ActionCable Channel [ci skip]
| * Fix typos in ActionCable Channel [ci skip]Tom Kadwill2016-04-184-5/+5
| |
* | don't remove `cable.js`yuuji.yaginuma2016-04-161-1/+3
| | | | | | | | `cable.js` is required for other Channels.
* | Merge pull request #24559 from vipulnsward/fix-ac-testsJeremy Daer2016-04-152-5/+3
|\ \ | | | | | | Fixed ActionCable::Connection::ClientSocketTest test
| * | - Fixed ActionCable::Connection::ClientSocketTest that was overriding ↵Vipul A M2016-04-152-5/+3
| | | | | | | | | | | | | | | | | | ActionCable::Connection::StreamTest test name - Only add attr_readers for required attributes
* | | Merge pull request #24557 from y-yagi/update_example_to_specify_ac_mount_pathVipul A M2016-04-151-4/+4
|\ \ \ | |/ / |/| | update example to specify the Action Cable mount path [ci skip]
| * | update example to specify the Action Cable mount path [ci skip]yuuji.yaginuma2016-04-151-4/+4
| | | | | | | | | | | | Follow up to 8b69f1e
* | | Run Action Cable callbacks through the worker poolSean Griffin2016-04-132-5/+30
|/ / | | | | | | | | | | | | | | | | | | Alternate implementation of #24162 with tests. The code had diverged too far on master to pull that implemenation directly. Fixes #23778 Close #24162 [Mattew Draper & Sean Griffin]
* / Generate `cable.js` file if does not exist when generating channelPrathamesh Sonpatki2016-04-122-0/+14
|/ | | | | | | | | - Before this, while generating a channel, we were not creating `cable.js` if it does not already exist. - We have similar code for application mailer here - https://github.com/rails/rails/commit/0b3ae023d27197417541932632055cd6be4810c4. - Based on the comment - https://github.com/rails/rails/issues/24418#issuecomment-205421995.
* Cable typo: isSupportedProtocol -> isProtocolSupportedJeremy Daer2016-04-051-1/+1
|
* Merge pull request #24224 from danielrhodes/actioncable-websocket-protocolsJeremy Daer2016-04-059-24/+93
|\ | | | | | | ActionCable protocol negotiation
| * Added protocol negotiationDaniel Rhodes2016-04-058-24/+73
| | | | | | | | | | | | | | | | | | This is primarily for backwards compatibility for when or if the protocol is changed in future versions. If the server fails to respond with an acceptable protocol, the client disconnects and disables the monitor.
* | Cable message encodingJeremy Daer2016-03-3118-154/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | Cable: reconcile default worker pool size with low db conn pool sizeJeremy Daer2016-03-302-2/+12
| | | | | | | | | | | | | | | | | | | | | | Whack it down from 100 to 4. Large worker pools means large db connection counts. We aren't set up for that by default and most apps won't need it out of the box. We're better off tuning the default worker pool for low traffic, low resource consumption apps. Those who have higher traffic will scale up to meet demand.
* | Fix CHANGELOG entry [ci skip]Rafael Mendonça França2016-03-301-1/+1
| |
* | Keep logging in the ActionCable::Channel::BaseRafael Mendonça França2016-03-303-110/+6
| | | | | | | | | | | | To move Action Cable logging to a LoggingSubscriber we need to pass the log tags in the notification payload since Action Cable logging use the Channel instance to tag the logs.
* | Merge pull request #23723 from mwear/action_cable_notificationsRafael Mendonça França2016-03-295-8/+204
|\ \ | | | | | | | | | Add ActiveSupport::Notification to Channel::Base#perform_action
| * | Add AS::Notifications and LogSubscriber to ActionCable::ChannelMatthew Wear2016-03-045-8/+204
| | | | | | | | | | | | | | | This commit adds ActiveSupport::Notifications instrumentation hooks and a LogSuscriber to ActionCable::Channel::Base.
* | | Cable: Shush pop warnings when skipping Postgres tests.Kasper Timm Hansen2016-03-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | `skip` raises an exception to abort the execution of the test, so `super` would never be called and thus `@rx_adapter` and `@tx_adapter` would never have been defined at the time of teardown. Define them just before skipping and zap the warnings.
* | | Shush up EM::Hiredis when running tests.Kasper Timm Hansen2016-03-261-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | EM::Hiredis were spewing screenfuls of warnings when running the Action Cable tests. Copied over the technique that shushes up faye-websocket in the client tests, so we can reduce the noise ratio. Note: there's still warnings spewed after tests have finished when EM::Hiredis shuts down. I haven't been able to shush them up yet.
* | | Cable: fix Faye periodic timer shutdown typoJeremy Daer2016-03-241-1/+1
| | |
* | | Merge pull request #24259 from jeremy/cable/disconnected-client-errorsJeremy Daer2016-03-235-1/+136
|\ \ \ | | | | | | | | Cable: Gracefully handle disconnected clients
| * | | Gracefully handle disconnected clientsJeremy Daer2016-03-205-1/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We'll get `Errno::ECONNRESET` if the client forcibly disconnected. Just close the socket rather than raising the exception. Handle other errors in `ClientSocket#write`, too, mirroring the Faye error handling which swallows all `StandardError` on write.
* | | | Fix WebSocket already open log message typoJon Evans2016-03-221-1/+1
| | | |
* | | | Cable: add isolated tests and FAYE=1 test runsJeremy Daer2016-03-201-0/+8
|/ / /
* | / Evented Redis adapter: log reconnect failures as errors, not just infoJeremy Daer2016-03-171-1/+1
| |/ |/| | | | | [ci skip]
* | AC: skip PG adapter tests if the db isn't availableJeremy Daer2016-03-111-0/+7
| |
* | Remove redundant regexp escapes in generatorsGadzhi Gadzhiev2016-03-081-1/+1
|/
* Return subscription object(s) when updating the collectionJavan Makhmali2016-03-041-3/+4
|
* Make sure ActionCable.Subscriptions#create always returns the newly created ↵Pratik Naik2016-03-041-0/+2
| | | | subscription object
* Store reference to Subscriptions instance for convenienceJavan Makhmali2016-03-031-5/+6
|
* Implicity add Subscription instance to subscriptions collectionJavan Makhmali2016-03-032-13/+12
|
* Share default mount path with client side .jsJavan Makhmali2016-03-033-3/+4
|
* Fix location of default mount path valueJavan Makhmali2016-03-031-2/+3
| | | | #getConfig was implmented as general utility for reading action-cable-* meta tags (hence the `name` argument). Introduced in 8b69f1eeba753c38364fb88136b2503480f2de1d.
* Defer starting connection monitor until a connection is openedJavan Makhmali2016-03-033-41/+52
|
* Establish WebSocket connection when first subscription is created. Fixes #24026Javan Makhmali2016-03-033-9/+10
| | | | | * More intention revealing than connecting on the first call to Connection#send * Fixes that calls to Connection#send would attempt to open a connection when the WebSocket's state is CONNECTING
* Merge pull request #23992 from matthewd/em-optionMatthew Draper2016-03-0429-51/+227
|\ | | | | Support faye-websocket + EventMachine as an option
| * Support faye-websocket + EventMachine as an optionMatthew Draper2016-03-0229-51/+227
| |
* | ConnectionMonitor is once again notified of disconnectDaniel Rhodes2016-03-032-0/+2
| |
* | Fix CHANGELOG spacing [ci skip]Jeremy Daer2016-03-021-12/+12
| |
* | Accept JSON with no backslashes/escapingJon Moss2016-03-024-8/+27
| | | | | | | | | | | | | | Fixes #22675 Allow channel identifiers and also data with no backslahes/escaping to be accepted by the subscription storer.
* | Merge pull request #23976 from danielrhodes/enhancement/ac-ping-to-message-typeMatthew Draper2016-03-027-19/+24
|\ \ | | | | | | | | | ActionCable: Add a "welcome" and "ping" message type
| * | Make ping into a message typeDaniel Rhodes2016-03-016-15/+10
| | | | | | | | | | | | | | | | | | | | | | | | This change makes ping into a message type, which makes the whole protocol a lot more consistent. Also fixes hacks on the client side to make this all work.
| * | Added welcome message type and fix test hacksDaniel Rhodes2016-03-015-5/+14
| | |