anycable-rails 1.3.5 → 1.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/anycable/rails/action_cable_ext/channel.rb +2 -0
- data/lib/anycable/rails/railtie.rb +6 -0
- data/lib/anycable/rails/version.rb +1 -1
- data/lib/generators/anycable/setup/setup_generator.rb +4 -0
- data/lib/generators/anycable/setup/templates/config/anycable.yml.tt +6 -8
- 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: d90b3f0b34ba001d46f7dee1f44bac4a123a986d60ef9a5779ca111fe1f95ee2
|
4
|
+
data.tar.gz: 398b67691ec76e6b687f1b2a1c88cc135e07e816aaa300a346345348a56c354c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17d9d88780fd3b04d464bb6503e6d58501fd23f450988d191d959839789ac88b208f3fa73898572d9d52a058dcd884e302ba6fb9cec4019e2f471b5c726b0248
|
7
|
+
data.tar.gz: 987913b5565498cbe3e2ea076176146ef6e1ff04c0ab6d31a25f4c9bee55f7ffeda13c8bdf7530a75433e936de5fea2578857644d1f55e26bb42616eedd3a883
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## 1.3.6 (2023-02-28)
|
6
|
+
|
7
|
+
- Handle `nil` streams gracefully. ([@palkan][])
|
8
|
+
|
9
|
+
- Report exceptions via the `Rails.error.report` interface. ([@palkan][])
|
10
|
+
|
5
11
|
## 1.3.5 (2023-01-04)
|
6
12
|
|
7
13
|
- Make misconfiguration error more informative. ([@palkan][])
|
@@ -45,6 +45,12 @@ module AnyCable
|
|
45
45
|
# see https://github.com/rails/rails/pull/33469/files
|
46
46
|
executor = app.config.reload_classes_only_on_change ? app.reloader : app.executor
|
47
47
|
AnyCable.middleware.use(AnyCable::Rails::Middlewares::Executor.new(executor))
|
48
|
+
|
49
|
+
if app.executor.respond_to?(:error_reporter)
|
50
|
+
AnyCable.capture_exception do |ex, method, message|
|
51
|
+
::Rails.error.report(ex, handled: false, context: {method: method, payload: message})
|
52
|
+
end
|
53
|
+
end
|
48
54
|
end
|
49
55
|
|
50
56
|
initializer "anycable.connection_factory", after: "action_cable.set_configs" do |app|
|
@@ -12,17 +12,14 @@
|
|
12
12
|
default: &default
|
13
13
|
# Turn on/off access logs ("Started..." and "Finished...")
|
14
14
|
access_logs_disabled: false
|
15
|
-
# Persist "dirty" session between RPC calls (might be required for apps using stimulus_reflex <3.0)
|
16
|
-
# persistent_session_enabled: true
|
17
|
-
# This is the host and the port to run AnyCable RPC server on.
|
18
|
-
# You must configure your WebSocket server to connect to it, e.g.:
|
19
|
-
# $ anycable-go --rpc-host="<rpc hostname>:50051"
|
20
|
-
rpc_host: "127.0.0.1:50051"
|
21
15
|
# Whether to enable gRPC level logging or not
|
22
16
|
log_grpc: false
|
23
17
|
<%- if redis? -%>
|
24
18
|
# Use Redis to broadcast messages to AnyCable server
|
25
19
|
broadcast_adapter: redis
|
20
|
+
<%- elsif nats? -%>
|
21
|
+
# Use NATS to broadcast messages to AnyCable server
|
22
|
+
broadcast_adapter: nats
|
26
23
|
<%- else -%>
|
27
24
|
# Use HTTP adapter for a quick start (since redis gem is not present in the project)
|
28
25
|
broadcast_adapter: http
|
@@ -44,7 +41,8 @@ test:
|
|
44
41
|
|
45
42
|
production:
|
46
43
|
<<: *default
|
47
|
-
<%- if !redis? -%>
|
48
|
-
# Use Redis in production
|
44
|
+
<%- if !redis? && !nats? -%>
|
45
|
+
# Use Redis or NATS in production
|
49
46
|
broadcast_adapter: redis
|
47
|
+
# broadcast_adapter: nats
|
50
48
|
<%- end -%>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anycable-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- palkan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01
|
11
|
+
date: 2023-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: anycable
|
@@ -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.6
|
209
209
|
signing_key:
|
210
210
|
specification_version: 4
|
211
211
|
summary: Rails adapter for AnyCable
|