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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8ac8286d286d0df2da0d7dba9d8234cf874f1e6bb42a1a4239d026ed928e7dd7
4
- data.tar.gz: 469e98720377a3d65bddd63f921a3faf78706d1c7f335b447ff0939719d0bd15
3
+ metadata.gz: 62bc4f7d0aef85236e0ff6a983e2a8c2db681397a70dacc91c85bbd4662377e8
4
+ data.tar.gz: 20cae16d638d1c47a96d5b235350c156d5e98f597858f72c9acab35aba3b0f0f
5
5
  SHA512:
6
- metadata.gz: 28eb7aaba4c993e055f40bbfd8f00d52d85f1dc1d95b952891c8ef99122f483b90851d4b5627477f9c63efa581acdd2770acaa13f06ea88c5d4ef0e33b48958f
7
- data.tar.gz: a89a9448aff1a8e03fc6e95f332b40df1fc295fcc3a406c393e1aeb312fdd947aba2c5cecd9978e03a84e422915e94ef34f7d30effa8398b4b401671d3d6ef8a
6
+ metadata.gz: bbb7e9670097c6ee0ce230f1a8226ffe0449c2cf4556b84bf465638fef385140c0aadbf2378477e37d09969617e74c66acda8c3c1f0075280abdc1a32792da58
7
+ data.tar.gz: 3a5498a417a077468f7adc6638c31f7d92a304f541475957bc74233e674c9cc6fc010ce432c9699b0eba2d308c8c1aacb4d85a21a7da7f48f8773162ece3c3fd
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 1.4.4 (2024-03-08) 🌷
6
+
7
+ - Minor fixes
8
+
5
9
  ## 1.4.3 (2023-12-13)
6
10
 
7
11
  - Fix console logging in Rails 7.1 when the app's logger has no broadcast support. ([@palkan][])
@@ -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
- def disconnect(reconnect: true)
9
- # Legacy Action Cable functionality if case we're not fully migrated yet
10
- super() unless AnyCable::Rails.enabled?
11
- ::AnyCable.broadcast_adapter.broadcast_command("disconnect", identifier: identifiers_json, reconnect: reconnect)
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)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module AnyCable
4
4
  module Rails
5
- VERSION = "1.4.3"
5
+ VERSION = "1.4.4"
6
6
  end
7
7
  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 "Which environment do you use for development? (1) Local, (2) Docker, (0) Skip"
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", chmod: 0o755
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 ||= (normalize_version(options[:version]) || "latest")
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
- AnyCable::Rails::Rack.middleware.use Warden::Manager do |config|
8
- Devise.warden_config = config
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.3
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: 2023-12-13 00:00:00.000000000 Z
11
+ date: 2024-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: anycable-core