actioncable 6.1.4.1 → 6.1.7.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +118 -0
- data/MIT-LICENSE +1 -1
- data/app/assets/javascripts/action_cable.js +59 -2
- data/lib/action_cable/gem_version.rb +2 -2
- data/lib/action_cable/server/broadcasting.rb +1 -1
- data/lib/action_cable.rb +1 -1
- metadata +14 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e19802530d1e4abc87910d01a7b9033f4f5c284b8ebff98debd1ee960bea5f6
|
4
|
+
data.tar.gz: 53b8100afcef5d23479e8e2cd0a16288c8ddbcd4fd3c4d904f8b2cfd8e85ee36
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db63477b6eead075ab6a1eb55a2edc3188aa1362106c62778cc53c5bb9f1075dd591c40592f072195b7e003a247e3ce275b02a1bcb94988a9d9a435151de3d21
|
7
|
+
data.tar.gz: ce9f3202e178b7d56b06ed1842d1f04319444efc9380a8ca83be5fb1921dbec8e95e39c4f152ad7c427252fb66ce0fa11be0e2753cfe27ff04560cffee64dc44
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,121 @@
|
|
1
|
+
## Rails 6.1.7.10 (October 23, 2024) ##
|
2
|
+
|
3
|
+
* No changes.
|
4
|
+
|
5
|
+
|
6
|
+
## Rails 6.1.7.9 (October 15, 2024) ##
|
7
|
+
|
8
|
+
* No changes.
|
9
|
+
|
10
|
+
|
11
|
+
## Rails 6.1.7.8 (June 04, 2024) ##
|
12
|
+
|
13
|
+
* No changes.
|
14
|
+
|
15
|
+
|
16
|
+
## Rails 6.1.7.7 (February 21, 2024) ##
|
17
|
+
|
18
|
+
* No changes.
|
19
|
+
|
20
|
+
|
21
|
+
## Rails 6.1.7.6 (August 22, 2023) ##
|
22
|
+
|
23
|
+
* No changes.
|
24
|
+
|
25
|
+
|
26
|
+
## Rails 6.1.7.5 (August 22, 2023) ##
|
27
|
+
|
28
|
+
* No changes.
|
29
|
+
|
30
|
+
|
31
|
+
## Rails 6.1.7.4 (June 26, 2023) ##
|
32
|
+
|
33
|
+
* No changes.
|
34
|
+
|
35
|
+
|
36
|
+
## Rails 6.1.7.3 (March 13, 2023) ##
|
37
|
+
|
38
|
+
* No changes.
|
39
|
+
|
40
|
+
|
41
|
+
## Rails 6.1.7.2 (January 24, 2023) ##
|
42
|
+
|
43
|
+
* No changes.
|
44
|
+
|
45
|
+
|
46
|
+
## Rails 6.1.7.1 (January 17, 2023) ##
|
47
|
+
|
48
|
+
* No changes.
|
49
|
+
|
50
|
+
|
51
|
+
## Rails 6.1.7 (September 09, 2022) ##
|
52
|
+
|
53
|
+
* No changes.
|
54
|
+
|
55
|
+
|
56
|
+
## Rails 6.1.6.1 (July 12, 2022) ##
|
57
|
+
|
58
|
+
* No changes.
|
59
|
+
|
60
|
+
|
61
|
+
## Rails 6.1.6 (May 09, 2022) ##
|
62
|
+
|
63
|
+
* No changes.
|
64
|
+
|
65
|
+
|
66
|
+
## Rails 6.1.5.1 (April 26, 2022) ##
|
67
|
+
|
68
|
+
* No changes.
|
69
|
+
|
70
|
+
|
71
|
+
## Rails 6.1.5 (March 09, 2022) ##
|
72
|
+
|
73
|
+
* The Action Cable client now ensures successful channel subscriptions:
|
74
|
+
|
75
|
+
* The client maintains a set of pending subscriptions until either
|
76
|
+
the server confirms the subscription or the channel is torn down.
|
77
|
+
* Rectifies the race condition where an unsubscribe is rapidly followed
|
78
|
+
by a subscribe (on the same channel identifier) and the requests are
|
79
|
+
handled out of order by the ActionCable server, thereby ignoring the
|
80
|
+
subscribe command.
|
81
|
+
|
82
|
+
*Daniel Spinosa*
|
83
|
+
|
84
|
+
* Truncate broadcast logging messages.
|
85
|
+
|
86
|
+
*J Smith*
|
87
|
+
|
88
|
+
|
89
|
+
## Rails 6.1.4.7 (March 08, 2022) ##
|
90
|
+
|
91
|
+
* No changes.
|
92
|
+
|
93
|
+
|
94
|
+
## Rails 6.1.4.6 (February 11, 2022) ##
|
95
|
+
|
96
|
+
* No changes.
|
97
|
+
|
98
|
+
|
99
|
+
## Rails 6.1.4.5 (February 11, 2022) ##
|
100
|
+
|
101
|
+
* No changes.
|
102
|
+
|
103
|
+
|
104
|
+
## Rails 6.1.4.4 (December 15, 2021) ##
|
105
|
+
|
106
|
+
* No changes.
|
107
|
+
|
108
|
+
|
109
|
+
## Rails 6.1.4.3 (December 14, 2021) ##
|
110
|
+
|
111
|
+
* No changes.
|
112
|
+
|
113
|
+
|
114
|
+
## Rails 6.1.4.2 (December 14, 2021) ##
|
115
|
+
|
116
|
+
* No changes.
|
117
|
+
|
118
|
+
|
1
119
|
## Rails 6.1.4.1 (August 19, 2021) ##
|
2
120
|
|
3
121
|
* No changes.
|
data/MIT-LICENSE
CHANGED
@@ -291,6 +291,7 @@
|
|
291
291
|
return this.monitor.recordPing();
|
292
292
|
|
293
293
|
case message_types.confirmation:
|
294
|
+
this.subscriptions.confirmSubscription(identifier);
|
294
295
|
return this.subscriptions.notify(identifier, "connected");
|
295
296
|
|
296
297
|
case message_types.rejection:
|
@@ -360,10 +361,52 @@
|
|
360
361
|
};
|
361
362
|
return Subscription;
|
362
363
|
}();
|
364
|
+
var SubscriptionGuarantor = function() {
|
365
|
+
function SubscriptionGuarantor(subscriptions) {
|
366
|
+
classCallCheck(this, SubscriptionGuarantor);
|
367
|
+
this.subscriptions = subscriptions;
|
368
|
+
this.pendingSubscriptions = [];
|
369
|
+
}
|
370
|
+
SubscriptionGuarantor.prototype.guarantee = function guarantee(subscription) {
|
371
|
+
if (this.pendingSubscriptions.indexOf(subscription) == -1) {
|
372
|
+
logger.log("SubscriptionGuarantor guaranteeing " + subscription.identifier);
|
373
|
+
this.pendingSubscriptions.push(subscription);
|
374
|
+
} else {
|
375
|
+
logger.log("SubscriptionGuarantor already guaranteeing " + subscription.identifier);
|
376
|
+
}
|
377
|
+
this.startGuaranteeing();
|
378
|
+
};
|
379
|
+
SubscriptionGuarantor.prototype.forget = function forget(subscription) {
|
380
|
+
logger.log("SubscriptionGuarantor forgetting " + subscription.identifier);
|
381
|
+
this.pendingSubscriptions = this.pendingSubscriptions.filter(function(s) {
|
382
|
+
return s !== subscription;
|
383
|
+
});
|
384
|
+
};
|
385
|
+
SubscriptionGuarantor.prototype.startGuaranteeing = function startGuaranteeing() {
|
386
|
+
this.stopGuaranteeing();
|
387
|
+
this.retrySubscribing();
|
388
|
+
};
|
389
|
+
SubscriptionGuarantor.prototype.stopGuaranteeing = function stopGuaranteeing() {
|
390
|
+
clearTimeout(this.retryTimeout);
|
391
|
+
};
|
392
|
+
SubscriptionGuarantor.prototype.retrySubscribing = function retrySubscribing() {
|
393
|
+
var _this = this;
|
394
|
+
this.retryTimeout = setTimeout(function() {
|
395
|
+
if (_this.subscriptions && typeof _this.subscriptions.subscribe === "function") {
|
396
|
+
_this.pendingSubscriptions.map(function(subscription) {
|
397
|
+
logger.log("SubscriptionGuarantor resubscribing " + subscription.identifier);
|
398
|
+
_this.subscriptions.subscribe(subscription);
|
399
|
+
});
|
400
|
+
}
|
401
|
+
}, 500);
|
402
|
+
};
|
403
|
+
return SubscriptionGuarantor;
|
404
|
+
}();
|
363
405
|
var Subscriptions = function() {
|
364
406
|
function Subscriptions(consumer) {
|
365
407
|
classCallCheck(this, Subscriptions);
|
366
408
|
this.consumer = consumer;
|
409
|
+
this.guarantor = new SubscriptionGuarantor(this);
|
367
410
|
this.subscriptions = [];
|
368
411
|
}
|
369
412
|
Subscriptions.prototype.create = function create(channelName, mixin) {
|
@@ -378,7 +421,7 @@
|
|
378
421
|
this.subscriptions.push(subscription);
|
379
422
|
this.consumer.ensureActiveConnection();
|
380
423
|
this.notify(subscription, "initialized");
|
381
|
-
this.
|
424
|
+
this.subscribe(subscription);
|
382
425
|
return subscription;
|
383
426
|
};
|
384
427
|
Subscriptions.prototype.remove = function remove(subscription) {
|
@@ -397,6 +440,7 @@
|
|
397
440
|
});
|
398
441
|
};
|
399
442
|
Subscriptions.prototype.forget = function forget(subscription) {
|
443
|
+
this.guarantor.forget(subscription);
|
400
444
|
this.subscriptions = this.subscriptions.filter(function(s) {
|
401
445
|
return s !== subscription;
|
402
446
|
});
|
@@ -410,7 +454,7 @@
|
|
410
454
|
Subscriptions.prototype.reload = function reload() {
|
411
455
|
var _this2 = this;
|
412
456
|
return this.subscriptions.map(function(subscription) {
|
413
|
-
return _this2.
|
457
|
+
return _this2.subscribe(subscription);
|
414
458
|
});
|
415
459
|
};
|
416
460
|
Subscriptions.prototype.notifyAll = function notifyAll(callbackName) {
|
@@ -436,6 +480,18 @@
|
|
436
480
|
return typeof subscription[callbackName] === "function" ? subscription[callbackName].apply(subscription, args) : undefined;
|
437
481
|
});
|
438
482
|
};
|
483
|
+
Subscriptions.prototype.subscribe = function subscribe(subscription) {
|
484
|
+
if (this.sendCommand(subscription, "subscribe")) {
|
485
|
+
this.guarantor.guarantee(subscription);
|
486
|
+
}
|
487
|
+
};
|
488
|
+
Subscriptions.prototype.confirmSubscription = function confirmSubscription(identifier) {
|
489
|
+
var _this4 = this;
|
490
|
+
logger.log("Subscription confirmed " + identifier);
|
491
|
+
this.findAll(identifier).map(function(subscription) {
|
492
|
+
return _this4.guarantor.forget(subscription);
|
493
|
+
});
|
494
|
+
};
|
439
495
|
Subscriptions.prototype.sendCommand = function sendCommand(subscription, command) {
|
440
496
|
var identifier = subscription.identifier;
|
441
497
|
return this.consumer.send({
|
@@ -506,6 +562,7 @@
|
|
506
562
|
exports.INTERNAL = INTERNAL;
|
507
563
|
exports.Subscription = Subscription;
|
508
564
|
exports.Subscriptions = Subscriptions;
|
565
|
+
exports.SubscriptionGuarantor = SubscriptionGuarantor;
|
509
566
|
exports.adapters = adapters;
|
510
567
|
exports.createWebSocketURL = createWebSocketURL;
|
511
568
|
exports.logger = logger;
|
@@ -40,7 +40,7 @@ module ActionCable
|
|
40
40
|
end
|
41
41
|
|
42
42
|
def broadcast(message)
|
43
|
-
server.logger.debug { "[ActionCable] Broadcasting to #{broadcasting}: #{message.inspect}" }
|
43
|
+
server.logger.debug { "[ActionCable] Broadcasting to #{broadcasting}: #{message.inspect.truncate(300)}" }
|
44
44
|
|
45
45
|
payload = { broadcasting: broadcasting, message: message, coder: coder }
|
46
46
|
ActiveSupport::Notifications.instrument("broadcast.action_cable", payload) do
|
data/lib/action_cable.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
#--
|
4
|
-
# Copyright (c) 2015-
|
4
|
+
# Copyright (c) 2015-2022 Basecamp, LLC
|
5
5
|
#
|
6
6
|
# Permission is hereby granted, free of charge, to any person obtaining
|
7
7
|
# a copy of this software and associated documentation files (the
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actioncable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.
|
4
|
+
version: 6.1.7.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pratik Naik
|
8
8
|
- David Heinemeier Hansson
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2024-10-23 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: 6.1.
|
20
|
+
version: 6.1.7.10
|
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: 6.1.
|
27
|
+
version: 6.1.7.10
|
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: 6.1.
|
34
|
+
version: 6.1.7.10
|
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: 6.1.
|
41
|
+
version: 6.1.7.10
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: nio4r
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -140,11 +140,12 @@ licenses:
|
|
140
140
|
- MIT
|
141
141
|
metadata:
|
142
142
|
bug_tracker_uri: https://github.com/rails/rails/issues
|
143
|
-
changelog_uri: https://github.com/rails/rails/blob/v6.1.
|
144
|
-
documentation_uri: https://api.rubyonrails.org/v6.1.
|
143
|
+
changelog_uri: https://github.com/rails/rails/blob/v6.1.7.10/actioncable/CHANGELOG.md
|
144
|
+
documentation_uri: https://api.rubyonrails.org/v6.1.7.10/
|
145
145
|
mailing_list_uri: https://discuss.rubyonrails.org/c/rubyonrails-talk
|
146
|
-
source_code_uri: https://github.com/rails/rails/tree/v6.1.
|
147
|
-
|
146
|
+
source_code_uri: https://github.com/rails/rails/tree/v6.1.7.10/actioncable
|
147
|
+
rubygems_mfa_required: 'true'
|
148
|
+
post_install_message:
|
148
149
|
rdoc_options: []
|
149
150
|
require_paths:
|
150
151
|
- lib
|
@@ -159,8 +160,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
160
|
- !ruby/object:Gem::Version
|
160
161
|
version: '0'
|
161
162
|
requirements: []
|
162
|
-
rubygems_version: 3.
|
163
|
-
signing_key:
|
163
|
+
rubygems_version: 3.5.16
|
164
|
+
signing_key:
|
164
165
|
specification_version: 4
|
165
166
|
summary: WebSocket framework for Rails.
|
166
167
|
test_files: []
|