actioncable 6.1.7.9 → 7.2.2.1
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 +33 -160
- data/MIT-LICENSE +1 -1
- data/README.md +5 -5
- data/app/assets/javascripts/action_cable.js +239 -302
- data/app/assets/javascripts/actioncable.esm.js +512 -0
- data/app/assets/javascripts/actioncable.js +510 -0
- data/lib/action_cable/channel/base.rb +114 -90
- data/lib/action_cable/channel/broadcasting.rb +25 -16
- data/lib/action_cable/channel/callbacks.rb +39 -0
- data/lib/action_cable/channel/naming.rb +10 -7
- data/lib/action_cable/channel/periodic_timers.rb +7 -7
- data/lib/action_cable/channel/streams.rb +81 -68
- data/lib/action_cable/channel/test_case.rb +133 -87
- data/lib/action_cable/connection/authorization.rb +4 -1
- data/lib/action_cable/connection/base.rb +71 -43
- data/lib/action_cable/connection/callbacks.rb +57 -0
- data/lib/action_cable/connection/client_socket.rb +3 -1
- data/lib/action_cable/connection/identification.rb +10 -6
- data/lib/action_cable/connection/internal_channel.rb +7 -2
- data/lib/action_cable/connection/message_buffer.rb +4 -1
- data/lib/action_cable/connection/stream.rb +2 -2
- data/lib/action_cable/connection/stream_event_loop.rb +4 -4
- data/lib/action_cable/connection/subscriptions.rb +8 -3
- data/lib/action_cable/connection/tagged_logger_proxy.rb +14 -9
- data/lib/action_cable/connection/test_case.rb +67 -55
- data/lib/action_cable/connection/web_socket.rb +11 -7
- data/lib/action_cable/deprecator.rb +9 -0
- data/lib/action_cable/engine.rb +28 -9
- data/lib/action_cable/gem_version.rb +7 -5
- data/lib/action_cable/helpers/action_cable_helper.rb +21 -18
- data/lib/action_cable/remote_connections.rb +25 -13
- data/lib/action_cable/server/base.rb +29 -14
- data/lib/action_cable/server/broadcasting.rb +24 -16
- data/lib/action_cable/server/configuration.rb +28 -14
- data/lib/action_cable/server/connections.rb +13 -5
- data/lib/action_cable/server/worker/active_record_connection_management.rb +4 -2
- data/lib/action_cable/server/worker.rb +7 -7
- data/lib/action_cable/subscription_adapter/async.rb +1 -1
- data/lib/action_cable/subscription_adapter/base.rb +2 -0
- data/lib/action_cable/subscription_adapter/channel_prefix.rb +2 -0
- data/lib/action_cable/subscription_adapter/inline.rb +2 -0
- data/lib/action_cable/subscription_adapter/postgresql.rb +6 -5
- data/lib/action_cable/subscription_adapter/redis.rb +101 -25
- data/lib/action_cable/subscription_adapter/subscriber_map.rb +2 -0
- data/lib/action_cable/subscription_adapter/test.rb +7 -6
- data/lib/action_cable/test_case.rb +2 -0
- data/lib/action_cable/test_helper.rb +89 -59
- data/lib/action_cable/version.rb +3 -1
- data/lib/action_cable.rb +30 -12
- data/lib/rails/generators/channel/USAGE +14 -8
- data/lib/rails/generators/channel/channel_generator.rb +95 -20
- data/lib/rails/generators/channel/templates/javascript/index.js.tt +1 -5
- data/lib/rails/generators/test_unit/channel_generator.rb +2 -0
- metadata +29 -15
- data/lib/action_cable/channel.rb +0 -17
- data/lib/action_cable/connection.rb +0 -22
- data/lib/action_cable/server.rb +0 -16
- data/lib/action_cable/subscription_adapter.rb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 720238323d1411f0913bcc9b65ac89d955c4fc4e708bbab5b5dd1c0c47c4cf00
|
4
|
+
data.tar.gz: 10a5cd05102adeda05b151a39c40183bc55c2c55c2c63dca5a13d642fcf49f58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0639a73b1efc8078fe167814911d5694e76781f618ac7fe5bb34ae8448ab495b60f598a76c6a0e8d7c9f45d9674d19564ad14eaae0ccaaf1f75b441d1318d7c8'
|
7
|
+
data.tar.gz: 4988a92b2c683bc86c28d60be1d2f92d1efe36bc5d33f814da55ac7328af60597fb0313321aa663b6d5632ecd565661725d12bf1238fa48a153b18d538e6e08e
|
data/CHANGELOG.md
CHANGED
@@ -1,195 +1,68 @@
|
|
1
|
-
## Rails
|
1
|
+
## Rails 7.2.2.1 (December 10, 2024) ##
|
2
2
|
|
3
3
|
* No changes.
|
4
4
|
|
5
5
|
|
6
|
-
## Rails
|
6
|
+
## Rails 7.2.2 (October 30, 2024) ##
|
7
7
|
|
8
8
|
* No changes.
|
9
9
|
|
10
10
|
|
11
|
-
## Rails
|
11
|
+
## Rails 7.2.1.2 (October 23, 2024) ##
|
12
12
|
|
13
13
|
* No changes.
|
14
14
|
|
15
15
|
|
16
|
-
## Rails
|
16
|
+
## Rails 7.2.1.1 (October 15, 2024) ##
|
17
17
|
|
18
18
|
* No changes.
|
19
19
|
|
20
20
|
|
21
|
-
## Rails
|
21
|
+
## Rails 7.2.1 (August 22, 2024) ##
|
22
22
|
|
23
23
|
* No changes.
|
24
24
|
|
25
25
|
|
26
|
-
## Rails
|
27
|
-
|
28
|
-
* No changes.
|
29
|
-
|
30
|
-
|
31
|
-
## Rails 6.1.7.3 (March 13, 2023) ##
|
32
|
-
|
33
|
-
* No changes.
|
34
|
-
|
35
|
-
|
36
|
-
## Rails 6.1.7.2 (January 24, 2023) ##
|
37
|
-
|
38
|
-
* No changes.
|
39
|
-
|
40
|
-
|
41
|
-
## Rails 6.1.7.1 (January 17, 2023) ##
|
42
|
-
|
43
|
-
* No changes.
|
44
|
-
|
45
|
-
|
46
|
-
## Rails 6.1.7 (September 09, 2022) ##
|
47
|
-
|
48
|
-
* No changes.
|
49
|
-
|
50
|
-
|
51
|
-
## Rails 6.1.6.1 (July 12, 2022) ##
|
52
|
-
|
53
|
-
* No changes.
|
54
|
-
|
55
|
-
|
56
|
-
## Rails 6.1.6 (May 09, 2022) ##
|
57
|
-
|
58
|
-
* No changes.
|
59
|
-
|
60
|
-
|
61
|
-
## Rails 6.1.5.1 (April 26, 2022) ##
|
62
|
-
|
63
|
-
* No changes.
|
64
|
-
|
65
|
-
|
66
|
-
## Rails 6.1.5 (March 09, 2022) ##
|
67
|
-
|
68
|
-
* The Action Cable client now ensures successful channel subscriptions:
|
69
|
-
|
70
|
-
* The client maintains a set of pending subscriptions until either
|
71
|
-
the server confirms the subscription or the channel is torn down.
|
72
|
-
* Rectifies the race condition where an unsubscribe is rapidly followed
|
73
|
-
by a subscribe (on the same channel identifier) and the requests are
|
74
|
-
handled out of order by the ActionCable server, thereby ignoring the
|
75
|
-
subscribe command.
|
76
|
-
|
77
|
-
*Daniel Spinosa*
|
78
|
-
|
79
|
-
* Truncate broadcast logging messages.
|
80
|
-
|
81
|
-
*J Smith*
|
82
|
-
|
83
|
-
|
84
|
-
## Rails 6.1.4.7 (March 08, 2022) ##
|
85
|
-
|
86
|
-
* No changes.
|
87
|
-
|
88
|
-
|
89
|
-
## Rails 6.1.4.6 (February 11, 2022) ##
|
90
|
-
|
91
|
-
* No changes.
|
92
|
-
|
93
|
-
|
94
|
-
## Rails 6.1.4.5 (February 11, 2022) ##
|
95
|
-
|
96
|
-
* No changes.
|
26
|
+
## Rails 7.2.0 (August 09, 2024) ##
|
97
27
|
|
28
|
+
* Bring `ActionCable::Connection::TestCookieJar` in alignment with `ActionDispatch::Cookies::CookieJar` in regards to setting the cookie value.
|
98
29
|
|
99
|
-
|
30
|
+
Before:
|
100
31
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
* No changes.
|
107
|
-
|
108
|
-
|
109
|
-
## Rails 6.1.4.2 (December 14, 2021) ##
|
110
|
-
|
111
|
-
* No changes.
|
112
|
-
|
113
|
-
|
114
|
-
## Rails 6.1.4.1 (August 19, 2021) ##
|
115
|
-
|
116
|
-
* No changes.
|
117
|
-
|
118
|
-
|
119
|
-
## Rails 6.1.4 (June 24, 2021) ##
|
120
|
-
|
121
|
-
* Fix `ArgumentError` with ruby 3.0 on `RemoteConnection#disconnect`.
|
122
|
-
|
123
|
-
*Vladislav*
|
124
|
-
|
125
|
-
|
126
|
-
## Rails 6.1.3.2 (May 05, 2021) ##
|
127
|
-
|
128
|
-
* No changes.
|
129
|
-
|
130
|
-
|
131
|
-
## Rails 6.1.3.1 (March 26, 2021) ##
|
132
|
-
|
133
|
-
* No changes.
|
134
|
-
|
135
|
-
|
136
|
-
## Rails 6.1.3 (February 17, 2021) ##
|
137
|
-
|
138
|
-
* No changes.
|
139
|
-
|
140
|
-
|
141
|
-
## Rails 6.1.2.1 (February 10, 2021) ##
|
142
|
-
|
143
|
-
* No changes.
|
144
|
-
|
145
|
-
|
146
|
-
## Rails 6.1.2 (February 09, 2021) ##
|
147
|
-
|
148
|
-
* No changes.
|
149
|
-
|
150
|
-
|
151
|
-
## Rails 6.1.1 (January 07, 2021) ##
|
152
|
-
|
153
|
-
* No changes.
|
154
|
-
|
155
|
-
|
156
|
-
## Rails 6.1.0 (December 09, 2020) ##
|
32
|
+
```ruby
|
33
|
+
cookies[:foo] = { value: "bar" }
|
34
|
+
puts cookies[:foo] # => { value: "bar" }
|
35
|
+
```
|
157
36
|
|
158
|
-
|
159
|
-
with `rescue_from` before they are logged, which is useful for error reporting
|
160
|
-
tools and other integrations.
|
37
|
+
After:
|
161
38
|
|
162
|
-
|
39
|
+
```ruby
|
40
|
+
cookies[:foo] = { value: "bar" }
|
41
|
+
puts cookies[:foo] # => "bar"
|
42
|
+
```
|
163
43
|
|
164
|
-
*
|
44
|
+
*Justin Ko*
|
165
45
|
|
166
|
-
|
46
|
+
* Record ping on every Action Cable message.
|
167
47
|
|
168
|
-
|
48
|
+
Previously only `ping` and `welcome` message types were keeping the connection active.
|
49
|
+
Now every Action Cable message updates the `pingedAt` value, preventing the connection
|
50
|
+
from being marked as stale.
|
169
51
|
|
170
|
-
*
|
52
|
+
*yauhenininjia*
|
171
53
|
|
172
|
-
* Add
|
54
|
+
* Add two new assertion methods for Action Cable test cases: `assert_has_no_stream`
|
55
|
+
and `assert_has_no_stream_for`.
|
173
56
|
|
174
|
-
|
175
|
-
|
57
|
+
These methods can be used to assert that a stream has been stopped, e.g. via
|
58
|
+
`stop_stream` or `stop_stream_for`. They complement the already existing
|
59
|
+
`assert_has_stream` and `assert_has_stream_for` methods.
|
176
60
|
|
177
|
-
```
|
178
|
-
|
179
|
-
|
180
|
-
application_name
|
181
|
-
------------------------
|
182
|
-
psql
|
183
|
-
ActionCable-PID-42
|
184
|
-
(2 rows)
|
185
|
-
*/
|
61
|
+
```ruby
|
62
|
+
assert_has_no_stream "messages"
|
63
|
+
assert_has_no_stream_for User.find(42)
|
186
64
|
```
|
187
65
|
|
188
|
-
*
|
189
|
-
|
190
|
-
* Subscription confirmations and rejections are now logged at the `DEBUG` level instead of `INFO`.
|
191
|
-
|
192
|
-
*DHH*
|
193
|
-
|
66
|
+
*Sebastian Pöll*, *Junichi Sato*
|
194
67
|
|
195
|
-
Please check [
|
68
|
+
Please check [7-1-stable](https://github.com/rails/rails/blob/7-1-stable/actioncable/CHANGELOG.md) for previous changes.
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
# Action Cable – Integrated WebSockets for Rails
|
1
|
+
# Action Cable – Integrated WebSockets for \Rails
|
2
2
|
|
3
|
-
Action Cable seamlessly integrates WebSockets with the rest of your Rails application.
|
3
|
+
Action Cable seamlessly integrates WebSockets with the rest of your \Rails application.
|
4
4
|
It allows for real-time features to be written in Ruby in the same style
|
5
|
-
and form as the rest of your Rails application, while still being performant
|
5
|
+
and form as the rest of your \Rails application, while still being performant
|
6
6
|
and scalable. It's a full-stack offering that provides both a client-side
|
7
7
|
JavaScript framework and a server-side Ruby framework. You have access to your full
|
8
8
|
domain model written with Active Record or your ORM of choice.
|
9
9
|
|
10
|
-
You can read more about Action Cable in the [Action Cable Overview](https://
|
10
|
+
You can read more about Action Cable in the [Action Cable Overview](https://guides.rubyonrails.org/action_cable_overview.html) guide.
|
11
11
|
|
12
12
|
## Support
|
13
13
|
|
@@ -15,7 +15,7 @@ API documentation is at:
|
|
15
15
|
|
16
16
|
* https://api.rubyonrails.org
|
17
17
|
|
18
|
-
Bug reports for the Ruby on Rails project can be filed here:
|
18
|
+
Bug reports for the Ruby on \Rails project can be filed here:
|
19
19
|
|
20
20
|
* https://github.com/rails/rails/issues
|
21
21
|
|