actioncable 7.2.3.1 → 8.0.5
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/CHANGELOG.md +28 -51
- data/lib/action_cable/channel/base.rb +2 -3
- data/lib/action_cable/connection/identification.rb +0 -2
- data/lib/action_cable/gem_version.rb +4 -4
- data/lib/action_cable/remote_connections.rb +32 -33
- data/lib/rails/generators/channel/channel_generator.rb +1 -1
- metadata +9 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e994e54e8ba56c3706857de74a6c843b15650350f0cb3cf62a649312e2628ef3
|
|
4
|
+
data.tar.gz: dc14edcc7dff93ef9b03467440d61fbe8ed5f1aeb44a341f812eeb048f33498e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 72fa1c5b8340995bcbb247d06898d04dedf857cb4c6b8b90c26c3c2a7c857c9379851ffb9aac7623977508556063e07ecd93373c897885549a9249c31a56aa95
|
|
7
|
+
data.tar.gz: '082128cb47cf100516305208001b6e2458ef0ee5dbd55f85cf70f8780cf3e9edde21da0b9d8e6620de597587d502392397ccd53d42d7bf414fa44e89e96228b1'
|
data/CHANGELOG.md
CHANGED
|
@@ -1,96 +1,73 @@
|
|
|
1
|
-
## Rails
|
|
1
|
+
## Rails 8.0.5 (March 24, 2026) ##
|
|
2
2
|
|
|
3
3
|
* No changes.
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
## Rails
|
|
6
|
+
## Rails 8.0.4.1 (March 23, 2026) ##
|
|
7
7
|
|
|
8
|
-
*
|
|
8
|
+
* No changes.
|
|
9
9
|
|
|
10
|
-
*Jean Boussier*
|
|
11
10
|
|
|
12
|
-
|
|
11
|
+
## Rails 8.0.4 (October 28, 2025) ##
|
|
13
12
|
|
|
14
|
-
|
|
13
|
+
* No changes.
|
|
15
14
|
|
|
16
|
-
* Ensure the Postgresql adapter always use a dedicated connection even during system tests.
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
pg client error during system tests.
|
|
16
|
+
## Rails 8.0.3 (September 22, 2025) ##
|
|
20
17
|
|
|
21
|
-
|
|
18
|
+
* Fixed compatibility with `redis` gem `5.4.1`
|
|
22
19
|
|
|
20
|
+
*Jean Boussier*
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
* Fixed a possible race condition in `stream_from`.
|
|
25
23
|
|
|
26
|
-
*
|
|
24
|
+
*OuYangJinTing*
|
|
27
25
|
|
|
28
26
|
|
|
29
|
-
## Rails
|
|
27
|
+
## Rails 8.0.2.1 (August 13, 2025) ##
|
|
30
28
|
|
|
31
29
|
* No changes.
|
|
32
30
|
|
|
33
31
|
|
|
34
|
-
## Rails
|
|
32
|
+
## Rails 8.0.2 (March 12, 2025) ##
|
|
35
33
|
|
|
36
34
|
* No changes.
|
|
37
35
|
|
|
38
36
|
|
|
39
|
-
## Rails
|
|
40
|
-
|
|
41
|
-
* No changes.
|
|
37
|
+
## Rails 8.0.1 (December 13, 2024) ##
|
|
42
38
|
|
|
39
|
+
* Ensure the Postgresql adapter always use a dedicated connection even during system tests.
|
|
43
40
|
|
|
44
|
-
|
|
41
|
+
Fix an issue with the Action Cable Postgresql adapter causing deadlock or various weird
|
|
42
|
+
pg client error during system tests.
|
|
45
43
|
|
|
46
|
-
*
|
|
44
|
+
*Jean Boussier*
|
|
47
45
|
|
|
48
46
|
|
|
49
|
-
## Rails
|
|
47
|
+
## Rails 8.0.0.1 (December 10, 2024) ##
|
|
50
48
|
|
|
51
49
|
* No changes.
|
|
52
50
|
|
|
53
51
|
|
|
54
|
-
## Rails
|
|
55
|
-
|
|
56
|
-
* Bring `ActionCable::Connection::TestCookieJar` in alignment with `ActionDispatch::Cookies::CookieJar` in regards to setting the cookie value.
|
|
57
|
-
|
|
58
|
-
Before:
|
|
52
|
+
## Rails 8.0.0 (November 07, 2024) ##
|
|
59
53
|
|
|
60
|
-
|
|
61
|
-
cookies[:foo] = { value: "bar" }
|
|
62
|
-
puts cookies[:foo] # => { value: "bar" }
|
|
63
|
-
```
|
|
54
|
+
* No changes.
|
|
64
55
|
|
|
65
|
-
After:
|
|
66
56
|
|
|
67
|
-
|
|
68
|
-
cookies[:foo] = { value: "bar" }
|
|
69
|
-
puts cookies[:foo] # => "bar"
|
|
70
|
-
```
|
|
57
|
+
## Rails 8.0.0.rc2 (October 30, 2024) ##
|
|
71
58
|
|
|
72
|
-
|
|
59
|
+
* No changes.
|
|
73
60
|
|
|
74
|
-
* Record ping on every Action Cable message.
|
|
75
61
|
|
|
76
|
-
|
|
77
|
-
Now every Action Cable message updates the `pingedAt` value, preventing the connection
|
|
78
|
-
from being marked as stale.
|
|
62
|
+
## Rails 8.0.0.rc1 (October 19, 2024) ##
|
|
79
63
|
|
|
80
|
-
|
|
64
|
+
* No changes.
|
|
81
65
|
|
|
82
|
-
* Add two new assertion methods for Action Cable test cases: `assert_has_no_stream`
|
|
83
|
-
and `assert_has_no_stream_for`.
|
|
84
66
|
|
|
85
|
-
|
|
86
|
-
`stop_stream` or `stop_stream_for`. They complement the already existing
|
|
87
|
-
`assert_has_stream` and `assert_has_stream_for` methods.
|
|
67
|
+
## Rails 8.0.0.beta1 (September 26, 2024) ##
|
|
88
68
|
|
|
89
|
-
|
|
90
|
-
assert_has_no_stream "messages"
|
|
91
|
-
assert_has_no_stream_for User.find(42)
|
|
92
|
-
```
|
|
69
|
+
* Add an `identifier` to the event payload for the ActiveSupport::Notification `transmit_subscription_confirmation.action_cable` and `transmit_subscription_rejection.action_cable`.
|
|
93
70
|
|
|
94
|
-
*
|
|
71
|
+
*Keith Schacht*
|
|
95
72
|
|
|
96
|
-
Please check [7-
|
|
73
|
+
Please check [7-2-stable](https://github.com/rails/rails/blob/7-2-stable/actioncable/CHANGELOG.md) for previous changes.
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
# :markup: markdown
|
|
4
4
|
|
|
5
|
-
require "set"
|
|
6
5
|
require "active_support/rescuable"
|
|
7
6
|
require "active_support/parameter_filter"
|
|
8
7
|
|
|
@@ -315,7 +314,7 @@ module ActionCable
|
|
|
315
314
|
unless subscription_confirmation_sent?
|
|
316
315
|
logger.debug "#{self.class.name} is transmitting the subscription confirmation"
|
|
317
316
|
|
|
318
|
-
ActiveSupport::Notifications.instrument("transmit_subscription_confirmation.action_cable", channel_class: self.class.name) do
|
|
317
|
+
ActiveSupport::Notifications.instrument("transmit_subscription_confirmation.action_cable", channel_class: self.class.name, identifier: @identifier) do
|
|
319
318
|
connection.transmit identifier: @identifier, type: ActionCable::INTERNAL[:message_types][:confirmation]
|
|
320
319
|
@subscription_confirmation_sent = true
|
|
321
320
|
end
|
|
@@ -330,7 +329,7 @@ module ActionCable
|
|
|
330
329
|
def transmit_subscription_rejection
|
|
331
330
|
logger.debug "#{self.class.name} is transmitting the subscription rejection"
|
|
332
331
|
|
|
333
|
-
ActiveSupport::Notifications.instrument("transmit_subscription_rejection.action_cable", channel_class: self.class.name) do
|
|
332
|
+
ActiveSupport::Notifications.instrument("transmit_subscription_rejection.action_cable", channel_class: self.class.name, identifier: @identifier) do
|
|
334
333
|
connection.transmit identifier: @identifier, type: ActionCable::INTERNAL[:message_types][:rejection]
|
|
335
334
|
end
|
|
336
335
|
end
|
|
@@ -39,45 +39,44 @@ module ActionCable
|
|
|
39
39
|
RemoteConnection.new(server, identifier)
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
class
|
|
49
|
-
class InvalidIdentifiersError < StandardError; end
|
|
42
|
+
# # Action Cable Remote Connection
|
|
43
|
+
#
|
|
44
|
+
# Represents a single remote connection found via
|
|
45
|
+
# `ActionCable.server.remote_connections.where(*)`. Exists solely for the
|
|
46
|
+
# purpose of calling #disconnect on that connection.
|
|
47
|
+
class RemoteConnection
|
|
48
|
+
class InvalidIdentifiersError < StandardError; end
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
include Connection::Identification, Connection::InternalChannel
|
|
52
51
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
def initialize(server, ids)
|
|
53
|
+
@server = server
|
|
54
|
+
set_identifier_instance_vars(ids)
|
|
55
|
+
end
|
|
57
56
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
# Uses the internal channel to disconnect the connection.
|
|
58
|
+
def disconnect(reconnect: true)
|
|
59
|
+
server.broadcast internal_channel, { type: "disconnect", reconnect: reconnect }
|
|
60
|
+
end
|
|
62
61
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
62
|
+
# Returns all the identifiers that were applied to this connection.
|
|
63
|
+
redefine_method :identifiers do
|
|
64
|
+
server.connection_identifiers
|
|
65
|
+
end
|
|
67
66
|
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
protected
|
|
68
|
+
attr_reader :server
|
|
70
69
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
70
|
+
private
|
|
71
|
+
def set_identifier_instance_vars(ids)
|
|
72
|
+
raise InvalidIdentifiersError unless valid_identifiers?(ids)
|
|
73
|
+
ids.each { |k, v| instance_variable_set("@#{k}", v) }
|
|
74
|
+
end
|
|
76
75
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
def valid_identifiers?(ids)
|
|
77
|
+
keys = ids.keys
|
|
78
|
+
identifiers.all? { |id| keys.include?(id) }
|
|
79
|
+
end
|
|
80
|
+
end
|
|
82
81
|
end
|
|
83
82
|
end
|
|
@@ -105,7 +105,7 @@ pin_all_from "app/javascript/channels", under: "channels"
|
|
|
105
105
|
end
|
|
106
106
|
|
|
107
107
|
def using_bun?
|
|
108
|
-
# Cannot assume
|
|
108
|
+
# Cannot assume Bun lockfile has been generated yet so we look for a file known to
|
|
109
109
|
# be generated by the jsbundling-rails gem
|
|
110
110
|
@using_bun ||= using_js_runtime? && root.join("bun.config.js").exist?
|
|
111
111
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: actioncable
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 8.0.5
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Pratik Naik
|
|
@@ -16,28 +16,28 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - '='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
19
|
+
version: 8.0.5
|
|
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:
|
|
26
|
+
version: 8.0.5
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: actionpack
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - '='
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
33
|
+
version: 8.0.5
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - '='
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
40
|
+
version: 8.0.5
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: nio4r
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -153,10 +153,10 @@ licenses:
|
|
|
153
153
|
- MIT
|
|
154
154
|
metadata:
|
|
155
155
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
|
156
|
-
changelog_uri: https://github.com/rails/rails/blob/
|
|
157
|
-
documentation_uri: https://api.rubyonrails.org/
|
|
156
|
+
changelog_uri: https://github.com/rails/rails/blob/v8.0.5/actioncable/CHANGELOG.md
|
|
157
|
+
documentation_uri: https://api.rubyonrails.org/v8.0.5/
|
|
158
158
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
|
159
|
-
source_code_uri: https://github.com/rails/rails/tree/
|
|
159
|
+
source_code_uri: https://github.com/rails/rails/tree/v8.0.5/actioncable
|
|
160
160
|
rubygems_mfa_required: 'true'
|
|
161
161
|
rdoc_options: []
|
|
162
162
|
require_paths:
|
|
@@ -165,7 +165,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
165
165
|
requirements:
|
|
166
166
|
- - ">="
|
|
167
167
|
- !ruby/object:Gem::Version
|
|
168
|
-
version: 3.
|
|
168
|
+
version: 3.2.0
|
|
169
169
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
170
170
|
requirements:
|
|
171
171
|
- - ">="
|