anycable-rails-core 1.4.3 → 1.4.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/anycable/rails/action_cable_ext/remote_connections.rb +13 -4
- data/lib/anycable/rails/version.rb +1 -1
- data/lib/generators/anycable/setup/setup_generator.rb +4 -3
- data/lib/generators/anycable/setup/templates/config/initializers/anycable.rb.tt +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62bc4f7d0aef85236e0ff6a983e2a8c2db681397a70dacc91c85bbd4662377e8
|
4
|
+
data.tar.gz: 20cae16d638d1c47a96d5b235350c156d5e98f597858f72c9acab35aba3b0f0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbb7e9670097c6ee0ce230f1a8226ffe0449c2cf4556b84bf465638fef385140c0aadbf2378477e37d09969617e74c66acda8c3c1f0075280abdc1a32792da58
|
7
|
+
data.tar.gz: 3a5498a417a077468f7adc6638c31f7d92a304f541475957bc74233e674c9cc6fc010ce432c9699b0eba2d308c8c1aacb4d85a21a7da7f48f8773162ece3c3fd
|
data/CHANGELOG.md
CHANGED
@@ -5,9 +5,18 @@ require "action_cable/remote_connections"
|
|
5
5
|
ActionCable::RemoteConnections::RemoteConnection.include(AnyCable::Rails::Connections::SerializableIdentification)
|
6
6
|
|
7
7
|
ActionCable::RemoteConnections::RemoteConnection.prepend(Module.new do
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
# Rails <7.1 has no `reconnect` argument
|
9
|
+
if ActionCable::RemoteConnections::RemoteConnection.instance_method(:disconnect).arity == 0
|
10
|
+
def disconnect(reconnect: true)
|
11
|
+
# Legacy Action Cable functionality if case we're not fully migrated yet
|
12
|
+
super() unless AnyCable::Rails.enabled?
|
13
|
+
::AnyCable.broadcast_adapter.broadcast_command("disconnect", identifier: identifiers_json, reconnect: reconnect)
|
14
|
+
end
|
15
|
+
else
|
16
|
+
def disconnect(reconnect: true)
|
17
|
+
# Legacy Action Cable functionality if case we're not fully migrated yet
|
18
|
+
super unless AnyCable::Rails.enabled?
|
19
|
+
::AnyCable.broadcast_adapter.broadcast_command("disconnect", identifier: identifiers_json, reconnect: reconnect)
|
20
|
+
end
|
12
21
|
end
|
13
22
|
end)
|
@@ -74,7 +74,7 @@ module AnyCableRailsGenerators
|
|
74
74
|
answer = DEVELOPMENT_METHODS.index(options[:devenv]) || 99
|
75
75
|
|
76
76
|
until DEVELOPMENT_METHODS[answer.to_i]
|
77
|
-
answer = ask "
|
77
|
+
answer = ask "Do you want to run anycable-go locally or as a Docker container? (1) Local, (2) Docker, (0) Skip"
|
78
78
|
end
|
79
79
|
|
80
80
|
case env = DEVELOPMENT_METHODS[answer.to_i]
|
@@ -224,7 +224,8 @@ module AnyCableRailsGenerators
|
|
224
224
|
|
225
225
|
def install_for_local
|
226
226
|
inside("bin") do
|
227
|
-
template "anycable-go"
|
227
|
+
template "anycable-go"
|
228
|
+
chmod "anycable-go", 0755, verbose: false # rubocop:disable Style/NumericLiteralPrefix
|
228
229
|
end
|
229
230
|
|
230
231
|
if file_exists?(".gitignore")
|
@@ -269,7 +270,7 @@ module AnyCableRailsGenerators
|
|
269
270
|
end
|
270
271
|
|
271
272
|
def anycable_go_version
|
272
|
-
@anycable_go_version ||=
|
273
|
+
@anycable_go_version ||= normalize_version(options[:version]) || "latest"
|
273
274
|
end
|
274
275
|
|
275
276
|
def normalize_version(version)
|
@@ -4,6 +4,10 @@
|
|
4
4
|
# Devise current user via `env["warden"].user`.
|
5
5
|
#
|
6
6
|
# See <%= DOCS_ROOT %>/ruby/authentication
|
7
|
-
|
8
|
-
|
7
|
+
#
|
8
|
+
# NOTE: This is only needed in environments where you use AnyCable.
|
9
|
+
if defined?(AnyCable::Rails)
|
10
|
+
AnyCable::Rails::Rack.middleware.use Warden::Manager do |config|
|
11
|
+
Devise.warden_config = config
|
12
|
+
end
|
9
13
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anycable-rails-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- palkan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: anycable-core
|