yrb-lite-actioncable 0.1.0.beta1 → 0.1.0.beta2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG-actioncable.md +13 -0
- data/lib/yrb_lite/action_cable/sync.rb +13 -2
- data/lib/yrb_lite/action_cable/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 27413345a88f1b9cd8ca4cdd4455ef42c4438ebe98493a8ba4a1a059b5da948a
|
|
4
|
+
data.tar.gz: fb6f7072aa9e8eb1fa4271fabc77cbe4620871718f3d3d49bcaa32ec857daba7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aea2006f44c6d26728c3e59452f44e8f1f2f62ccb06c26a8b7e83ddbfc4c50c96f951b462de95409501140be572881e91b83a1a424de7b01f8513af8f8985784
|
|
7
|
+
data.tar.gz: b28ffe8e6ee5648d9c4f492d7cd7e2151e4d6055a2f400c5cdc7d8b5c13b6ee4052c3fbb036aa683b7019603729917930f5f6fd9afc17edc92caf32784bd9dd2
|
data/CHANGELOG-actioncable.md
CHANGED
|
@@ -6,6 +6,18 @@ this project aims to follow [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.1.0.beta2] - 2026-06-20
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Automatic AnyCable whispering for awareness/presence. When running under
|
|
14
|
+
AnyCable, the channel now enables client-to-client whispering on its stream
|
|
15
|
+
(`stream_from key, whisper: true`), so a client that whispers awareness has its
|
|
16
|
+
presence frames broadcast directly to other subscribers with no server
|
|
17
|
+
round-trip. It's automatic -- no configuration -- and a no-op on plain
|
|
18
|
+
ActionCable (no whisper support), where presence stays server-relayed. Document
|
|
19
|
+
updates are never whispered.
|
|
20
|
+
|
|
9
21
|
## [0.1.0.beta1] - 2026-06-18
|
|
10
22
|
|
|
11
23
|
### Added
|
|
@@ -23,4 +35,5 @@ this project aims to follow [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
23
35
|
directly.
|
|
24
36
|
|
|
25
37
|
[Unreleased]: https://github.com/jpcamara/yrb-lite/commits/main
|
|
38
|
+
[0.1.0.beta2]: https://github.com/jpcamara/yrb-lite/commits/main
|
|
26
39
|
[0.1.0.beta1]: https://github.com/jpcamara/yrb-lite/releases/tag/v0.1.0.beta5
|
|
@@ -121,7 +121,7 @@ module YrbLite::ActionCable # rubocop:disable Style/ClassAndModuleChildren
|
|
|
121
121
|
Sync.subscribe(@sync_key)
|
|
122
122
|
awareness = sync_awareness
|
|
123
123
|
|
|
124
|
-
|
|
124
|
+
sync_stream sync_stream_name, coder: ActiveSupport::JSON do |payload|
|
|
125
125
|
sync_on_broadcast(payload)
|
|
126
126
|
end
|
|
127
127
|
|
|
@@ -399,10 +399,21 @@ module YrbLite::ActionCable # rubocop:disable Style/ClassAndModuleChildren
|
|
|
399
399
|
# outside Ruby) relays them directly. Send the opening SyncStep1 built from
|
|
400
400
|
# the durable store. No warm replica is kept.
|
|
401
401
|
def sync_for_store_backed
|
|
402
|
-
|
|
402
|
+
sync_stream sync_stream_name
|
|
403
403
|
sync_transmit(sync_load_doc.sync_step1)
|
|
404
404
|
end
|
|
405
405
|
|
|
406
|
+
# Subscribe to the document's broadcast stream. Under AnyCable (which adds a
|
|
407
|
+
# `whispers_to` method) this also enables client-to-client whispering on the
|
|
408
|
+
# stream, so a client that whispers awareness (any AnyCable consumer can)
|
|
409
|
+
# reaches other subscribers with no server round-trip. On plain ActionCable
|
|
410
|
+
# the option is omitted -- there's no whisper support -- so presence is
|
|
411
|
+
# server-relayed. It's automatic either way; nothing to configure.
|
|
412
|
+
def sync_stream(name, **opts, &)
|
|
413
|
+
opts[:whisper] = true if respond_to?(:whispers_to)
|
|
414
|
+
stream_from(name, **opts, &)
|
|
415
|
+
end
|
|
416
|
+
|
|
406
417
|
# Stateless per message: no warm replica, no assumptions about which process
|
|
407
418
|
# owns a document. A client's SyncStep1 is answered from the store, document
|
|
408
419
|
# changes are recorded durably before relay and then broadcast, and
|