anycable-rack-server 0.5.0 → 0.5.1
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/README.md +1 -1
- data/lib/anycable/rack/connection.rb +6 -0
- data/lib/anycable/rack/middleware.rb +1 -1
- data/lib/anycable/rack/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4297bef5c67ff80f26274def5beb36a1211132cd1ac4ad83f71d787527a706f3
|
4
|
+
data.tar.gz: f60d4fbb02cab97d1b598fd9fffb4d082394977a8ab758060a901276b866d7c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 690b6ce367c468485028a01234af402978bc47fb992bd63ba3c6c37d23041eaf501f8dc1be4d992be26be6b91a7ea252e1cd26cd66c80ef081cc6fe98d894c76
|
7
|
+
data.tar.gz: a6f1fc52911181c219c72feba59994644abe36dff7bfdc2060254e833cdee7809128a9fe3c4b96e2ca821c2a754e80e97eb9dd0d775c63e2f603280d6f70a31d
|
data/README.md
CHANGED
@@ -26,7 +26,7 @@ run app
|
|
26
26
|
|
27
27
|
## Usage with Rails
|
28
28
|
|
29
|
-
Add `gem "anycable-rack-server"` to you `Gemfile` and make sure your Action Cable adapter is set to `:any_cable`. That's it! We automatically start AnyCable Rack server for
|
29
|
+
Add `gem "anycable-rack-server"` to you `Gemfile` and make sure your Action Cable adapter is set to `:any_cable`. That's it! We automatically start AnyCable Rack server for you at `/cable` path.
|
30
30
|
|
31
31
|
## Configuration
|
32
32
|
|
@@ -57,6 +57,7 @@ module AnyCable
|
|
57
57
|
when "subscribe" then subscribe(channel_identifier)
|
58
58
|
when "unsubscribe" then unsubscribe(channel_identifier)
|
59
59
|
when "message" then send_message(channel_identifier, decoded["data"])
|
60
|
+
when "history" then send_history(channel_identifier, decoded["history"])
|
60
61
|
else
|
61
62
|
log(:error, "Command not found #{command}")
|
62
63
|
end
|
@@ -133,6 +134,11 @@ module AnyCable
|
|
133
134
|
process_command(response, identifier)
|
134
135
|
end
|
135
136
|
|
137
|
+
def send_history(identifier, history)
|
138
|
+
log(:debug) { "History is not truly supported. Responding with reject_history" }
|
139
|
+
transmit({"type" => "reject_history"})
|
140
|
+
end
|
141
|
+
|
136
142
|
def process_command(response, identifier)
|
137
143
|
response.transmissions.each { |transmission| transmit(decode_transmission(transmission)) }
|
138
144
|
hub.remove_channel(socket, identifier) if response.stop_streams
|
@@ -9,7 +9,7 @@ require "anycable/rack/socket"
|
|
9
9
|
module AnyCable
|
10
10
|
module Rack
|
11
11
|
class Middleware # :nodoc:
|
12
|
-
PROTOCOLS = %w[actioncable-v1-json actioncable-v1-msgpack actioncable-unsupported actioncable-v1-protobuf].freeze
|
12
|
+
PROTOCOLS = %w[actioncable-v1-json actioncable-v1-ext-json actioncable-v1-msgpack actioncable-unsupported actioncable-v1-protobuf].freeze
|
13
13
|
|
14
14
|
attr_reader :pinger,
|
15
15
|
:hub,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anycable-rack-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yulia Oletskaya
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-06-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: anyway_config
|
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
205
|
- !ruby/object:Gem::Version
|
206
206
|
version: '0'
|
207
207
|
requirements: []
|
208
|
-
rubygems_version: 3.
|
208
|
+
rubygems_version: 3.4.8
|
209
209
|
signing_key:
|
210
210
|
specification_version: 4
|
211
211
|
summary: AnyCable Rack Server
|