anycable-rails 1.3.5 → 1.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -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 +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 60aa4eb7cba077db3f823f54b6c2f3e792ea5bdd1819c0e67a743e8feeb02fe2
|
4
|
+
data.tar.gz: 6ff7352202e587af57c80729f7b62b8316873b9e230a32cd802f217b76d90bab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: befbe33cd332ef3f4be7b7eb754975bf38970d8cb67428e1ff68f72826da00b88c5b1ca203cee01433f5c3c197ec26148cdb8b2a0534afe93d48962055417b85
|
7
|
+
data.tar.gz: d6e97f87c28a15d07204bb4d78d371b66d982794156064ad12dc03c21a35dec41de48d0a7b433d079438fce6d89b940f9ff7feb856472f263083edb3dfe33d99
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
+
## 1.3.7 (2023-02-28)
|
6
|
+
|
7
|
+
- Fix `anycable` gem dependency constraints.
|
8
|
+
|
9
|
+
- Require Ruby 2.7+.
|
10
|
+
|
11
|
+
## 1.3.6 (2023-02-28)
|
12
|
+
|
13
|
+
- Handle `nil` streams gracefully. ([@palkan][])
|
14
|
+
|
15
|
+
- Report exceptions via the `Rails.error.report` interface. ([@palkan][])
|
16
|
+
|
5
17
|
## 1.3.5 (2023-01-04)
|
6
18
|
|
7
19
|
- 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.7
|
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
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.3.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.3.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: actioncable
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,14 +198,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
198
198
|
requirements:
|
199
199
|
- - ">="
|
200
200
|
- !ruby/object:Gem::Version
|
201
|
-
version: '2.
|
201
|
+
version: '2.7'
|
202
202
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
203
203
|
requirements:
|
204
204
|
- - ">="
|
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
|