actioncable 6.1.4 → 7.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +31 -54
  3. data/MIT-LICENSE +1 -1
  4. data/app/assets/javascripts/action_cable.js +229 -256
  5. data/app/assets/javascripts/actioncable.esm.js +491 -0
  6. data/app/assets/javascripts/actioncable.js +489 -0
  7. data/lib/action_cable/channel/broadcasting.rb +1 -1
  8. data/lib/action_cable/channel/streams.rb +5 -7
  9. data/lib/action_cable/channel/test_case.rb +16 -1
  10. data/lib/action_cable/connection/base.rb +3 -3
  11. data/lib/action_cable/connection/identification.rb +1 -1
  12. data/lib/action_cable/connection/subscriptions.rb +1 -1
  13. data/lib/action_cable/connection/tagged_logger_proxy.rb +2 -2
  14. data/lib/action_cable/engine.rb +9 -0
  15. data/lib/action_cable/gem_version.rb +4 -4
  16. data/lib/action_cable/helpers/action_cable_helper.rb +3 -2
  17. data/lib/action_cable/server/broadcasting.rb +1 -1
  18. data/lib/action_cable/server/configuration.rb +1 -0
  19. data/lib/action_cable/server/worker/active_record_connection_management.rb +2 -2
  20. data/lib/action_cable/server/worker.rb +3 -4
  21. data/lib/action_cable/subscription_adapter/postgresql.rb +2 -2
  22. data/lib/action_cable/test_helper.rb +2 -2
  23. data/lib/action_cable.rb +1 -1
  24. data/lib/rails/generators/channel/USAGE +1 -1
  25. data/lib/rails/generators/channel/channel_generator.rb +79 -20
  26. data/lib/rails/generators/channel/templates/application_cable/{channel.rb.tt → channel.rb} +0 -0
  27. data/lib/rails/generators/channel/templates/application_cable/{connection.rb.tt → connection.rb} +0 -0
  28. data/lib/rails/generators/channel/templates/javascript/index.js.tt +1 -5
  29. metadata +18 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 05cca3266ae9261fcd849d830b1b001be190e0d17bcc49c6b80b5b9a7159a4b3
4
- data.tar.gz: 826474f43e3c3415c4efdfb76ed89f1bb1888e873a8c3e423741e432864bb317
3
+ metadata.gz: 77fed9177b7396d25b06497f0415166d69ec9548766d1f4d626f8969f8479182
4
+ data.tar.gz: 9dab0cc363d5b4a4f9f6c351ca07640ecf51a19e309fe407b6ffc447eaa7537b
5
5
  SHA512:
6
- metadata.gz: f3e8c5e7fab833c8da3d06b46d7fb6d684ce9c7e4af01808bf7c1e6b900a5a6c5bf78cc9cff721408a213507564921a3f0ee42a4dced79a60718651af336c744
7
- data.tar.gz: 0ea242801867b4972336c15c76add7df6e745ac5f6de0c7607b9c23919ea31e1d57aed86b265bdedae7ff8513ba378c565cd6da23ff840e0a768af56faa718f6
6
+ metadata.gz: 776737a1c60a7f7c32eded16455f2394c9554833746f587578d2ff38f8af074029cd511a933726ad21d7bae0d8f5a369468521531d95473f409ffe545c7b882c
7
+ data.tar.gz: 276df3bead6e608db6ab342d5de7f460598cb5a23cb1a0623135090e8fefffd2a5ae18e88ec7ec87fd66a8231d1fa5a4f1c0a9b2d66d743c1aee7df291242f19
data/CHANGELOG.md CHANGED
@@ -1,77 +1,54 @@
1
- ## Rails 6.1.4 (June 24, 2021) ##
1
+ * The Action Cable client now ensures successful channel subscriptions:
2
2
 
3
- * Fix `ArgumentError` with ruby 3.0 on `RemoteConnection#disconnect`.
3
+ * The client maintains a set of pending subscriptions until either
4
+ the server confirms the subscription or the channel is torn down.
5
+ * Rectifies the race condition where an unsubscribe is rapidly followed
6
+ by a subscribe (on the same channel identifier) and the requests are
7
+ handled out of order by the ActionCable server, thereby ignoring the
8
+ subscribe command.
4
9
 
5
- *Vladislav*
10
+ *Daniel Spinosa*
6
11
 
7
12
 
8
- ## Rails 6.1.3.2 (May 05, 2021) ##
13
+ ## Rails 7.0.0.alpha2 (September 15, 2021) ##
9
14
 
10
15
  * No changes.
11
16
 
12
17
 
13
- ## Rails 6.1.3.1 (March 26, 2021) ##
14
-
15
- * No changes.
16
-
17
-
18
- ## Rails 6.1.3 (February 17, 2021) ##
19
-
20
- * No changes.
18
+ ## Rails 7.0.0.alpha1 (September 15, 2021) ##
21
19
 
20
+ * Compile ESM package that can be used directly in the browser as actioncable.esm.js.
22
21
 
23
- ## Rails 6.1.2.1 (February 10, 2021) ##
24
-
25
- * No changes.
26
-
27
-
28
- ## Rails 6.1.2 (February 09, 2021) ##
29
-
30
- * No changes.
31
-
32
-
33
- ## Rails 6.1.1 (January 07, 2021) ##
34
-
35
- * No changes.
36
-
37
-
38
- ## Rails 6.1.0 (December 09, 2020) ##
39
-
40
- * `ActionCable::Connection::Base` now allows intercepting unhandled exceptions
41
- with `rescue_from` before they are logged, which is useful for error reporting
42
- tools and other integrations.
22
+ *DHH*
43
23
 
44
- *Justin Talbott*
24
+ * Move action_cable.js to actioncable.js to match naming convention used for other Rails frameworks, and use JS console to communicate the deprecation.
45
25
 
46
- * Add `ActionCable::Channel#stream_or_reject_for` to stream if record is present, otherwise reject the connection
26
+ *DHH*
47
27
 
48
- *Atul Bhosale*
28
+ * Stop transpiling the UMD package generated as actioncable.js and drop the IE11 testing that relied on that.
49
29
 
50
- * Add `ActionCable::Channel#stop_stream_from` and `#stop_stream_for` to unsubscribe from a specific stream.
30
+ *DHH*
51
31
 
52
- *Zhang Kang*
32
+ * Truncate broadcast logging messages.
53
33
 
54
- * Add PostgreSQL subscription connection identificator.
34
+ *J Smith*
55
35
 
56
- Now you can distinguish Action Cable PostgreSQL subscription connections among others.
57
- Also, you can set custom `id` in `cable.yml` configuration.
36
+ * OpenSSL constants are now used for Digest computations.
58
37
 
59
- ```sql
60
- SELECT application_name FROM pg_stat_activity;
61
- /*
62
- application_name
63
- ------------------------
64
- psql
65
- ActionCable-PID-42
66
- (2 rows)
67
- */
68
- ```
38
+ *Dirkjan Bussink*
69
39
 
70
- *Sergey Ponomarev*
40
+ * The Action Cable client now includes safeguards to prevent a "thundering
41
+ herd" of client reconnects after server connectivity loss:
71
42
 
72
- * Subscription confirmations and rejections are now logged at the `DEBUG` level instead of `INFO`.
43
+ * The client will wait a random amount between 1x and 3x of the stale
44
+ threshold after the server's last ping before making the first
45
+ reconnection attempt.
46
+ * Subsequent reconnection attempts now use exponential backoff instead of
47
+ logarithmic backoff. To allow the delay between reconnection attempts to
48
+ increase slowly at first, the default exponentiation base is < 2.
49
+ * Random jitter is applied to each delay between reconnection attempts.
73
50
 
74
- *DHH*
51
+ *Jonathan Hefner*
75
52
 
76
53
 
77
- Please check [6-0-stable](https://github.com/rails/rails/blob/6-0-stable/actioncable/CHANGELOG.md) for previous changes.
54
+ Please check [6-1-stable](https://github.com/rails/rails/blob/6-1-stable/actioncable/CHANGELOG.md) for previous changes.
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2015-2020 Basecamp, LLC
1
+ Copyright (c) 2015-2021 Basecamp, LLC
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the