Skip to content

Releases: anycable/anycable-rails

1.6.0.rc.1

04 Feb 00:53
441b4b1
Compare
Choose a tag to compare
1.6.0.rc.1 Pre-release
Pre-release

This release adds presence API for channels:

class ChatChannel < ApplicationCable::Channel
  def subscribed
    room = Chat::Room.find(params[:id])

    stream_for room

    join_presence(id: current_user.id, info: {name: current_user.name})
  end
end

See docs.

1.5.0

02 Apr 00:05
Compare
Choose a tag to compare

Features

  • 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.

1.4.2

03 Nov 21:59
Compare
Choose a tag to compare

Features

  • New broadcast ..., to_others: true API.

This new API makes it possible to exclude initiator from the list of recipients.

See docs.

  • Automatic batch broadcasting.

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.

Changes

  • Print warning if the database pool size is less than RPC pool size.

1.3.7

01 Mar 01:44
Compare
Choose a tag to compare

Features

  • Added Rails.error.report integration for Rails 7+.

    Now you don't need to manually configure AnyCable.capture_exception { ... } if your error reporting library support Rails 7 error reporting interface.

Changes

  • Ruby 2.7+ is required.

1.3.4

05 Jul 15:32
Compare
Choose a tag to compare

Features

  • Add support and backport for Connection command callbacks.
  • Backport command callbacks, so it could be used in Rails <7.1 (even w/o AnyCable).

1.3.0

21 Feb 18:40
Compare
Choose a tag to compare

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.

Changes

  • Action Cable integration is completely rewritten to avoid potential patches incompatibility. The amount of patches code has been minimized, no more open classes, only Module#prepend with a feature check.

Features

  • Added 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).

Other

1.2.0 🎄

21 Dec 18:13
Compare
Choose a tag to compare

The release ends Ruby 2.6 and Rails 5 support.

No significant changes. It's just Christmas time ⛄️

1.1.0 🚸

01 Jun 11:48
Compare
Choose a tag to compare

This is a maintenance release. Most changes are internal and doesn't affect public APIs.

Requirements

  • Ruby >= 2.6 is required.
  • Rails >= 6.0 is required.

Changes

  • Adding 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.

Features

  • Added ability to embed AnyCable RPC into a Rails server process.

Set embedded: true in the configuration to launch RPC along with rails s (only for Rails 6.1+).


Full release notes

1.1.0.rc1

12 May 17:10
Compare
Choose a tag to compare
1.1.0.rc1 Pre-release
Pre-release

See notes for v1.1.0.

1.0.0

30 Jun 20:56
Compare
Choose a tag to compare

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.

Features

  • 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.

  • Added Rack middleware support (incl. out-of-the-box Rails sessions support).

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.

  • Added 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.

Changes

  • Using anycable-go v1.x is required.