actioncable 7.2.2.1 → 8.0.0.beta1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 720238323d1411f0913bcc9b65ac89d955c4fc4e708bbab5b5dd1c0c47c4cf00
4
- data.tar.gz: 10a5cd05102adeda05b151a39c40183bc55c2c55c2c63dca5a13d642fcf49f58
3
+ metadata.gz: 8fbb636a677c963849f247b80e4b42f86c89925d34e326ddb0ec53745433e7ea
4
+ data.tar.gz: 7dc0e29e27c83651f099d3f3c2f2561ca2e01c37f9d543c9dbf258425576eb5f
5
5
  SHA512:
6
- metadata.gz: '0639a73b1efc8078fe167814911d5694e76781f618ac7fe5bb34ae8448ab495b60f598a76c6a0e8d7c9f45d9674d19564ad14eaae0ccaaf1f75b441d1318d7c8'
7
- data.tar.gz: 4988a92b2c683bc86c28d60be1d2f92d1efe36bc5d33f814da55ac7328af60597fb0313321aa663b6d5632ecd565661725d12bf1238fa48a153b18d538e6e08e
6
+ metadata.gz: 2f771d4a87f7f3a599e36ce5f4f2648d6f312e4898b34d6709fd215fd64b65fa71b3ca768ef530069926c3aee88d32b15dffc323dff1fef13c2488ef1cbca83d
7
+ data.tar.gz: 7778ccb1dc1f864ec5b15d138f040e687d5d6efde6acbef35e45031338b83efcafbe33eed6ae8dcc17664825c42bda692e646c1ef4036f2f14bc040acc7f9b0c
data/CHANGELOG.md CHANGED
@@ -1,68 +1,7 @@
1
- ## Rails 7.2.2.1 (December 10, 2024) ##
1
+ ## Rails 8.0.0.beta1 (September 26, 2024) ##
2
2
 
3
- * No changes.
3
+ * Add an `identifier` to the event payload for the ActiveSupport::Notification `transmit_subscription_confirmation.action_cable` and `transmit_subscription_rejection.action_cable`.
4
4
 
5
+ *Keith Schacht*
5
6
 
6
- ## Rails 7.2.2 (October 30, 2024) ##
7
-
8
- * No changes.
9
-
10
-
11
- ## Rails 7.2.1.2 (October 23, 2024) ##
12
-
13
- * No changes.
14
-
15
-
16
- ## Rails 7.2.1.1 (October 15, 2024) ##
17
-
18
- * No changes.
19
-
20
-
21
- ## Rails 7.2.1 (August 22, 2024) ##
22
-
23
- * No changes.
24
-
25
-
26
- ## Rails 7.2.0 (August 09, 2024) ##
27
-
28
- * Bring `ActionCable::Connection::TestCookieJar` in alignment with `ActionDispatch::Cookies::CookieJar` in regards to setting the cookie value.
29
-
30
- Before:
31
-
32
- ```ruby
33
- cookies[:foo] = { value: "bar" }
34
- puts cookies[:foo] # => { value: "bar" }
35
- ```
36
-
37
- After:
38
-
39
- ```ruby
40
- cookies[:foo] = { value: "bar" }
41
- puts cookies[:foo] # => "bar"
42
- ```
43
-
44
- *Justin Ko*
45
-
46
- * Record ping on every Action Cable message.
47
-
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.
51
-
52
- *yauhenininjia*
53
-
54
- * Add two new assertion methods for Action Cable test cases: `assert_has_no_stream`
55
- and `assert_has_no_stream_for`.
56
-
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.
60
-
61
- ```ruby
62
- assert_has_no_stream "messages"
63
- assert_has_no_stream_for User.find(42)
64
- ```
65
-
66
- *Sebastian Pöll*, *Junichi Sato*
67
-
68
- Please check [7-1-stable](https://github.com/rails/rails/blob/7-1-stable/actioncable/CHANGELOG.md) for previous changes.
7
+ Please check [7-2-stable](https://github.com/rails/rails/blob/7-2-stable/actioncable/CHANGELOG.md) for previous changes.
@@ -309,7 +309,7 @@ module ActionCable
309
309
  unless subscription_confirmation_sent?
310
310
  logger.debug "#{self.class.name} is transmitting the subscription confirmation"
311
311
 
312
- ActiveSupport::Notifications.instrument("transmit_subscription_confirmation.action_cable", channel_class: self.class.name) do
312
+ ActiveSupport::Notifications.instrument("transmit_subscription_confirmation.action_cable", channel_class: self.class.name, identifier: @identifier) do
313
313
  connection.transmit identifier: @identifier, type: ActionCable::INTERNAL[:message_types][:confirmation]
314
314
  @subscription_confirmation_sent = true
315
315
  end
@@ -324,7 +324,7 @@ module ActionCable
324
324
  def transmit_subscription_rejection
325
325
  logger.debug "#{self.class.name} is transmitting the subscription rejection"
326
326
 
327
- ActiveSupport::Notifications.instrument("transmit_subscription_rejection.action_cable", channel_class: self.class.name) do
327
+ ActiveSupport::Notifications.instrument("transmit_subscription_rejection.action_cable", channel_class: self.class.name, identifier: @identifier) do
328
328
  connection.transmit identifier: @identifier, type: ActionCable::INTERNAL[:message_types][:rejection]
329
329
  end
330
330
  end
@@ -9,10 +9,10 @@ module ActionCable
9
9
  end
10
10
 
11
11
  module VERSION
12
- MAJOR = 7
13
- MINOR = 2
14
- TINY = 2
15
- PRE = "1"
12
+ MAJOR = 8
13
+ MINOR = 0
14
+ TINY = 0
15
+ PRE = "beta1"
16
16
 
17
17
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
18
18
  end
@@ -39,45 +39,44 @@ module ActionCable
39
39
  RemoteConnection.new(server, identifier)
40
40
  end
41
41
 
42
- private
43
- # # Action Cable Remote Connection
44
- #
45
- # Represents a single remote connection found via
46
- # `ActionCable.server.remote_connections.where(*)`. Exists solely for the
47
- # purpose of calling #disconnect on that connection.
48
- class RemoteConnection
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
- include Connection::Identification, Connection::InternalChannel
50
+ include Connection::Identification, Connection::InternalChannel
52
51
 
53
- def initialize(server, ids)
54
- @server = server
55
- set_identifier_instance_vars(ids)
56
- end
52
+ def initialize(server, ids)
53
+ @server = server
54
+ set_identifier_instance_vars(ids)
55
+ end
57
56
 
58
- # Uses the internal channel to disconnect the connection.
59
- def disconnect(reconnect: true)
60
- server.broadcast internal_channel, { type: "disconnect", reconnect: reconnect }
61
- end
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
- # Returns all the identifiers that were applied to this connection.
64
- redefine_method :identifiers do
65
- server.connection_identifiers
66
- end
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
- protected
69
- attr_reader :server
67
+ protected
68
+ attr_reader :server
70
69
 
71
- private
72
- def set_identifier_instance_vars(ids)
73
- raise InvalidIdentifiersError unless valid_identifiers?(ids)
74
- ids.each { |k, v| instance_variable_set("@#{k}", v) }
75
- end
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
- def valid_identifiers?(ids)
78
- keys = ids.keys
79
- identifiers.all? { |id| keys.include?(id) }
80
- end
81
- end
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
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: 7.2.2.1
4
+ version: 8.0.0.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pratik Naik
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-12-10 00:00:00.000000000 Z
12
+ date: 2024-09-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
@@ -17,28 +17,28 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 7.2.2.1
20
+ version: 8.0.0.beta1
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '='
26
26
  - !ruby/object:Gem::Version
27
- version: 7.2.2.1
27
+ version: 8.0.0.beta1
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: actionpack
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - '='
33
33
  - !ruby/object:Gem::Version
34
- version: 7.2.2.1
34
+ version: 8.0.0.beta1
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - '='
40
40
  - !ruby/object:Gem::Version
41
- version: 7.2.2.1
41
+ version: 8.0.0.beta1
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: nio4r
44
44
  requirement: !ruby/object:Gem::Requirement
@@ -154,10 +154,10 @@ licenses:
154
154
  - MIT
155
155
  metadata:
156
156
  bug_tracker_uri: https://github.com/rails/rails/issues
157
- changelog_uri: https://github.com/rails/rails/blob/v7.2.2.1/actioncable/CHANGELOG.md
158
- documentation_uri: https://api.rubyonrails.org/v7.2.2.1/
157
+ changelog_uri: https://github.com/rails/rails/blob/v8.0.0.beta1/actioncable/CHANGELOG.md
158
+ documentation_uri: https://api.rubyonrails.org/v8.0.0.beta1/
159
159
  mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
160
- source_code_uri: https://github.com/rails/rails/tree/v7.2.2.1/actioncable
160
+ source_code_uri: https://github.com/rails/rails/tree/v8.0.0.beta1/actioncable
161
161
  rubygems_mfa_required: 'true'
162
162
  post_install_message:
163
163
  rdoc_options: []
@@ -167,14 +167,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
167
167
  requirements:
168
168
  - - ">="
169
169
  - !ruby/object:Gem::Version
170
- version: 3.1.0
170
+ version: 3.2.0
171
171
  required_rubygems_version: !ruby/object:Gem::Requirement
172
172
  requirements:
173
173
  - - ">="
174
174
  - !ruby/object:Gem::Version
175
175
  version: '0'
176
176
  requirements: []
177
- rubygems_version: 3.5.22
177
+ rubygems_version: 3.5.16
178
178
  signing_key:
179
179
  specification_version: 4
180
180
  summary: WebSocket framework for Rails.