AnyCable for Ruby on Rails applications
JWT functionality is available without additional dependencies.
No need to install anycable-rails-jwt anymore.
Signed streams support.
Added #signed_stream_name
helper and AnyCable::Rails.signed_stream_name
helper to generate signed streams.
Added websocket_url
parameter to provide a WS server address for clients.
This new parameter automatically updates the config.action_cable.url
to provide the WS server information to clients via #action_cable_meta_tag
(or #action_cable_with_jwt_meta_tag
) helpers. Thus, all you need to point your clients to AnyCable is configure the websocket_url
(or ANYCABLE_WEBSOCKET_URL
) value, no code changes required.
Allow specifying the whispering stream via #stream_from(..., whisper: true)
.
You can use specify the stream to use for whispering (client-initiated broadcasts) by adding whisper: true
to the #stream_from
(or #stream_for
) method call.
Broadcasting to objects.
Extended ActionCable.server.broadcast
to accept not only strings but objects (similar to Channel.broadcast_to(...)
).
See docs.
Extracted rails g anycable:bin
from rails g anycable:setup
.
This generator creates a bin/anycable-go
script to run (and install) AnyCable server locally.
No need to install anycable-rails-jwt anymore.
Added #signed_stream_name
helper and AnyCable::Rails.signed_stream_name
helper to generate signed streams.
websocket_url
parameter to provide a WS server address for clients.This new parameter automatically updates the config.action_cable.url
to provide the WS server information to clients via #action_cable_meta_tag
(or #action_cable_with_jwt_meta_tag
) helpers. Thus, all you need to point your clients to AnyCable is configure the websocket_url
(or ANYCABLE_WEBSOCKET_URL
) value, no code changes required.
Extended ActionCable.server.broadcast
to accept not only strings but objects (similar to Channel.broadcast_to(...)
).
See docs.
rails g anycable:bin
from rails g anycable:setup
.This generator creates a bin/anycable-go
script to run (and install) AnyCable server locally.
broadcast ..., to_others: true
API.This new API makes it possible to exclude initiator from the list of recipients.
See docs.
It's possible to turn batch broadcasting on for web requests, background jobs, or any other units of work in Rails applications. The feature uses new batch broadcasting API.
See docs.
This release makes our Action Cable integration more robust and safe to use with other extensions. We also made it easier to run both Action Cable and AnyCable at the same time, so you can migrate gradually.
Module#prepend
with a feature check.AnyCable::Rails.extend_adapter!
method to make any Action Cable pub/sub adapter compatible with AnyCable (i.e., broadcast updates to both Action Cable engine and AnyCable).The release ends Ruby 2.6 and Rails 5 support.
No significant changes. It's just Christmas time ⛄️
This is a maintenance release. Most changes are internal and doesn't affect public APIs.
anycable
or grpc
gem as an explicit dependency is required.Now, anycable-rails
depends on anycable-core
, which doesn't include gRPC server implementation.
You should either add anycable
or grpc
(>= 1.37) gem as an explicit dependency.
Set embedded: true
in the configuration to launch RPC along with rails s
(only for Rails 6.1+).
See notes for v1.1.0.
See the project's release notes for more information on all AnyCable libraries.
Please, checkout the upgrade notes to learn how to migrate from 0.6 to 1.0.
Added interactive rails g anycable:setup
command for initial AnyCable configuration.
Added request
support to channels.
Now you can access underlying HTTP request data in channels, too.
You can enhance request object by passing it through a custom middleware chain (e.g., when using Warden for authentication). By default, we include Rails session middleware, which makes request.session
available in AnyCable without any hacks.
See documentation.
state_attr_accessor
to persist channels state.See documentation.
Added support for ActionCable.server.remote_connections.where(...).disconnect
.
Added compatibility with Rails 6.1.
Including type: :disconnect
messages, Connection.rescue_from
, stop_stream_from
.
anycable-go
v1.x is required.