AnyCable for Ruby on Rails applications
RubyConf 2018 special.
tl;dr use anycable
CLI instead of generator; use :any_cable
subscription adapter for Action Cable to activate AnyCable.
NOTE: this version has been yanked from RubyGems due to the regression bug. Use 0.6.1.
This release requires anycable
gem >= 0.6.0. See release notes for anycable
0.6.0.
See also upgrade notes.
No need to generate AnyCable runner script since anycable
gem ships with the CLI.
Scripts generated by the previous version should work (unless have a non-generated code).
:any_cable
subscription adapter for Action Cable.Use :any_cable
adapter for Action Cable to broadcast data to AnyCable.
Action Cable monkey-patches are only loaded in the context of AnyCable CLI. ([@palkan][])
No need to think about require
and group
for anycable-rails
, just add it to Gemfile.
Added support for request verification based on ActionCable config (disable_forgery_protection
, allow_same_origin_as_host
and allowed_request_origins
)
Add compatibility checks.
See documentation.
Session ID feature is supported by anycable-go
>= 0.6.0.
Tagged logging is supported (was ignored previously).
Added Rails executor/reloader support.
Now code changes are handled by RPC server (in development).
Now we use Rails logger everywhere. That means, for example, that ANYCABLE_DEBUG=1
won't work anymore, set your config.log_level
to :debug
instead.
You can enable Action Cable-like access logs:
# anycable.yml
production:
access_logs_disabled: false
Now you can find in your logs:
Started "/cable" [Anycable] for at 2017-10-21 12:32:32 +0300
...
Finished "/cable" [Anycable] for at 2017-10-21 12:32:35 +0300 (Closed)
See also release notes for anycable
gem.