aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable/lib/action_cable
Commit message (Collapse)AuthorAgeFilesLines
* Accept JSON with no backslashes/escapingJon Moss2016-03-021-6/+19
| | | | | | | 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-021-5/+5
|\ | | | | | | ActionCable: Add a "welcome" and "ping" message type
| * Make ping into a message typeDaniel Rhodes2016-03-011-1/+1
| | | | | | | | | | | | | | | | 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-011-4/+4
| |
* | Use AS::Executor / AS::Reloader to support reloading in ActionCableMatthew Draper2016-03-025-24/+67
|/
* Merge pull request #23811 from iamvery/string-channelDavid Heinemeier Hansson2016-02-282-1/+2
|\ | | | | Ensure actioncable behaves as expected with non-string queues
| * Ensure server broadcasts are to string queue namesJay Hayes2016-02-241-1/+1
| | | | | | | | | | | | Similar to the channel streaming side, these values must be strings for ActionCable to behave as expected. The conversion will allow users to send string-convertible values and get the expected behavior.
| * Convert stream broadcasting to a stringJay Hayes2016-02-241-0/+1
| | | | | | | | | | | | | | ActionCable does some things behind the scenes that expects these "broadcasting"s or "channel"s to be strings. However it's not immediately obvious that the value must be a string. So adding this conversion ensures things work as expected.
* | Add small Action Cable documentation fixesHayley Anderson2016-02-273-8/+8
| | | | | | | | | | * Fix typos/grammar errors * Make capitalization/naming consistent
* | Merge pull request #23916 from ↵Jeremy Daer2016-02-261-2/+6
|\ \ | | | | | | | | | | | | lifo/same-redis-connection-for-subscription-and-broadcast Always use redis_connector to create redis connections
| * | Use redis_connector to create redis connections for both subscriptions and ↵Pratik Naik2016-02-261-2/+6
| | | | | | | | | | | | broadcasts
* | | The async.callback call should live with the hijackMatthew Draper2016-02-261-4/+5
| | | | | | | | | | | | If we're deferring one, we should defer the other too.
* | | Merge pull request #23843 from maclover7/fix-23471Matthew Draper2016-02-252-10/+9
|\ \ \ | | | | | | | | Only hijack Rack socket when first needed
| * | | Only hijack Rack socket when first neededJon Moss2016-02-242-10/+9
| | |/ | |/| | | | | | | Fixes #23471
* / | Enable Action Cable routes by defaultJon Moss2016-02-243-4/+26
|/ / | | | | | | This also marks Action Cable routes as internal to Rails.
* | Prep release for Rails 5 beta3eileencodes2016-02-241-1/+1
| |
* | Merge pull request #23813 from lifo/faye-websocketDavid Heinemeier Hansson2016-02-231-1/+8
|\ \ | | | | | | Improve Action Cable reconnection reliability
| * | Confirm connection monitor subscription on openPratik Naik2016-02-231-1/+8
| |/
* | Merge pull request #23668 from maclover7/cable-docsRafael França2016-02-2215-58/+55
|\ \ | |/ |/| Full Action Cable documentation read through
| * Full Action Cable documentation read throughJon Moss2016-02-1715-58/+55
| | | | | | | | | | | | | | | | | | This PR checks all active Action Cable documentation for typos and other fixes. It aims to make sure that when Rails 5 is released, that the Action Cable docs are up to snuff with the other documentation included with Rails. [ci skip]
* | Fixed typoChashmeet Singh2016-02-211-1/+1
| |
* | Merge pull request #23709 from jankeesvw/set-action-cable-logging-to-debugDavid Heinemeier Hansson2016-02-191-1/+1
|\ \ | | | | | | Make ActionCable logging less verbose in development
| * | Truncate ActionCable broadcast message to 300 charsJankees van Woezik2016-02-181-1/+1
| |/ | | | | | | | | | | When running the ActionCable server in development I get a lot of output in my logs, this commit sets a maximum length of 300 characters for a broadcast log message.
* / Fix `unsubscribed` server side behaviorJon Moss2016-02-182-6/+3
|/ | | | | | | | | | | | | Before this commit, the `unsubscribed` callbacks in Action Cable server side channels were never called. This is because when a WebSocket "goodbye" message was sent from the client, the Action Cable server didn't properly clean up after the now closed WebSocket. This means that memory could possibly skyrocket with this behavior, since part of this commit is to properly remove closed subscriptions from the global subscriptions hash. Say you have 10,000 users currently connected, and then all 10,000 disconnect -- before this patch, Action Cable would still hold onto information (and Ruby objects!) for all of these now dead connections.
* Merge pull request #23505 from kaspth/inject-rails-config-through-railtieKasper Timm Hansen2016-02-142-11/+10
|\ | | | | Inject Rails related configuration through Railtie
| * Default connection class to ActionCable::Connection::Base.Kasper Timm Hansen2016-02-142-2/+6
| | | | | | | | | | | | | | 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-142-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Fix grammar `a` to `an` [ci skip]Ryuta Kamizono2016-02-132-2/+2
| |
* | Merge remote-tracking branch 'origin/master' into actioncable_loggingkp2016-02-1014-105/+349
|\|
| * Allow for non-standard redis connectorsDavid Heinemeier Hansson2016-02-042-3/+15
| |
| * [ci skip] Several ActionCable documentation updates:Nick Quaranto2016-02-024-40/+53
| | | | | | | | | | | | | | | | * Properly indent code sample in ActionCable::Channel::Streams * Add a doc comment for #stop_all_streams * Reformat + add <tt> blocks around code references in ActionCable::Base docs * Clarify and a little better grammar on ActionCable::RemoteConnections * Correct indentation and clean up ActionCable::Server::Broadcasting code sample
| * Preparing for Rails 5.0.0.beta2Sean Griffin2016-02-011-1/+1
| |
| * Switch the default redis adapter to a single-stream modelMatthew Draper2016-02-012-30/+193
| | | | | | | | | | | | This new adapter does get a little more intimate with the redis-rb gem's implementation than I would like, but it's the least bad of the approaches I've come up with.
| * Handle more IO errors (especially, ECONNRESET)Matthew Draper2016-01-301-21/+47
| | | | | | | | | | | | Also, address the possibility of the listen thread dying and needing to be respawned. As a bonus, we now defer construction of the thread until we are first given something to monitor.
| * Synchronize the lazy setters in ServerMatthew Draper2016-01-305-15/+47
| | | | | | | | They're all at risk of races on the first requests.
| * Fix arguments to on_closeMatthew Draper2016-01-302-5/+3
| |
| * Revert "Revert "Eliminate the EventMachine dependency""Matthew Draper2016-01-3016-46/+349
| |
| * Revert "Eliminate the EventMachine dependency"David Heinemeier Hansson2016-01-2716-349/+46
| |
* | Logs successful and invalid connections separatelykp2016-02-101-8/+12
| |
* | adds debug logging to actioncable connectkp2016-01-261-2/+12
|/
* Merge branch '5-0-beta-sec'Aaron Patterson2016-01-251-1/+1
|\ | | | | | | | | | | | | | | | | | | | | * 5-0-beta-sec: bumping version fix version update task to deal with .beta1.1 Eliminate instance level writers for class accessors allow :file to be outside rails root, but anything else must be inside the rails view directory Don't short-circuit reject_if proc stop caching mime types globally use secure string comparisons for basic auth username / password
| * bumping versionAaron Patterson2016-01-251-1/+1
| |
* | Merge pull request #23185 from droptheplot/actioncable-custom-channelsKasper Timm Hansen2016-01-241-3/+5
|\ \ | | | | | | ActionCable: Allow adding custom paths for channels
| * | Rename channels_path var and fix channel_paths method for ActionCable configSergey Novikov2016-01-231-5/+5
| | |
| * | Allow adding custom paths for action_cable channelsSergey Novikov2016-01-221-2/+4
| | |
* | | Ditch the EM error logging helperMatthew Draper2016-01-241-8/+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.
* | | Import the relevant portions of faye-websocketMatthew Draper2016-01-247-21/+321
| | | | | | | | | | | | (as adapted to use concurrent-ruby / nio4r instead of eventmachine)
* | | Using a hacked faye-websocket, drop EventMachineMatthew Draper2016-01-249-22/+33
| | |
* | | Allow subscription adapters to be shut downMatthew Draper2016-01-244-14/+40
| | |
* | | Add Async and Inline adaptersMatthew Draper2016-01-242-0/+44
| | | | | | | | | | | | | | | Just like their ActiveJob equivalents, these only work within the current process.