1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

19 commits

Author SHA1 Message Date
Matthew Draper
a373be9da4 Support faye-websocket + EventMachine as an option 2016-03-02 12:17:15 +10:30
Jon Moss
8b69f1eeba Enable Action Cable routes by default
This also marks Action Cable routes as internal to Rails.
2016-02-24 19:05:03 -05:00
Jon Moss
05088b6299 Full Action Cable documentation read through
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]
2016-02-17 11:08:00 -05:00
Kasper Timm Hansen
861ece99bb Default connection class to ActionCable::Connection::Base.
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.
2016-02-14 17:46:48 +01:00
Kasper Timm Hansen
661298176c Inject Rails' channel paths in engine.
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.
2016-02-14 17:46:48 +01:00
Sergey Novikov
a17f7a0bc1 Rename channels_path var and fix channel_paths method for ActionCable config 2016-01-23 02:50:03 +03:00
Sergey Novikov
91656aed59 Allow adding custom paths for action_cable channels 2016-01-22 16:52:12 +03:00
Matthew Draper
56a9341689 Merge pull request #22950 from maclover7/adapterize-storage-actioncable
Adapterize storage for ActionCable
2016-01-20 16:09:20 +10:30
Jon Moss
ae31da20cd Fix code review comments
- adapter -> pubsub (re)rename internally
- Change variable names to match method names
- Add EventMachine `~> 1.0` as a runtime dependency of ActionCable
- Refactor dependency loading for adapters
2016-01-18 19:37:25 -05:00
Jon Moss
67af248d51 Small PostgreSQL adapter refactors / cleanup
- Escape the channel name when subscribing in PG
- Refactor popping the queue to make it easier to read
2016-01-18 18:59:31 -05:00
Jon Moss
4c5d5b75ab ActionCable::StorageAdapter ==> ActionCable::SubscriptionAdapter 2016-01-18 18:59:30 -05:00
Jon Moss
75489642c8 config_opts => cable, per @kaspth 2016-01-18 18:59:28 -05:00
Jon Moss
439154250c Refactor storage_adapter 2016-01-18 18:59:00 -05:00
Jon Moss
0016e0410b Adapterize ActionCable storage and extract behavior 2016-01-18 18:58:57 -05:00
eileencodes
19e7f65dd1 Don't log Action Cable to STDOUT in development
Logging Action Cable to STDOUT caused the development log to see double
messages like this:

```
Started GET "/" for ::1 at 2015-12-17 15:21:34 -0500
Started GET "/" for ::1 at 2015-12-17 15:21:34 -0500
Processing by Rails::WelcomeController#index as HTML
Processing by Rails::WelcomeController#index as HTML
Rendered /welcome/index.html.erb (0.0ms)
Rendered /welcome/index.html.erb (0.0ms)
Completed 200 OK in 3ms (Views: 1.3ms | ActiveRecord: 0.0ms)
Completed 200 OK in 3ms (Views: 1.3ms | ActiveRecord: 0.0ms)
```

Now that Action Cable is part of Rails it doesn't need it's own logger
and will log to STDOUT via the local dev server here:
https://github.com/rails/rails/blob/master/railties/lib/rails/commands/server.rb
2015-12-17 15:30:40 -05:00
Rafael Mendonça França
649b9d9321 Move the require to the right place 2015-12-15 16:05:42 -02:00
Rafael Mendonça França
23faa711c9 Remove the default logger
It should be configured through the railtie
2015-12-15 16:02:47 -02:00
Rafael Mendonça França
96455349ff Configure the Action Cable's redis in the engine
This will decouple Action Cable from Rails.
2015-12-15 15:59:00 -02:00
David Heinemeier Hansson
bf40bddfce Get ready to merge into Rails 2015-12-14 15:48:54 +01:00
Renamed from lib/action_cable/server/configuration.rb (Browse further)