anycable-rails-core 1.5.3 → 1.6.2
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 +31 -1
- data/README.md +10 -75
- data/lib/anycable/rails/action_cable_ext/channel.rb +20 -11
- data/lib/anycable/rails/action_cable_ext/remote_connections.rb +4 -14
- data/lib/anycable/rails/channel/presence.rb +36 -0
- data/lib/anycable/rails/channel.rb +9 -0
- data/lib/anycable/rails/compatibility/rubocop.rb +2 -25
- data/lib/anycable/rails/compatibility.rb +2 -0
- data/lib/anycable/rails/config.rb +2 -0
- data/lib/anycable/rails/connection.rb +62 -33
- data/lib/anycable/rails/connection_factory.rb +20 -1
- data/lib/anycable/rails/connections/persistent_session.rb +5 -0
- data/lib/anycable/rails/connections/serializable_identification.rb +19 -0
- data/lib/anycable/rails/connections/session_proxy.rb +2 -2
- data/lib/anycable/rails/ext/jwt.rb +1 -1
- data/lib/anycable/rails/ext/signed_streams.rb +21 -0
- data/lib/anycable/rails/ext/whisper.rb +34 -0
- data/lib/anycable/rails/ext.rb +4 -1
- data/lib/anycable/rails/helper.rb +2 -2
- data/lib/anycable/rails/next/action_cable_ext/channel.rb +36 -0
- data/lib/anycable/rails/next/action_cable_ext/connection.rb +29 -0
- data/lib/anycable/rails/next/connection/persistent_session.rb +39 -0
- data/lib/anycable/rails/next/connection.rb +226 -0
- data/lib/anycable/rails/railtie.rb +4 -8
- data/lib/anycable/rails/{compatibility/rubocop → rubocop}/cops/anycable/instance_vars.rb +1 -1
- data/lib/anycable/rails/{compatibility/rubocop → rubocop}/cops/anycable/periodical_timers.rb +3 -8
- data/lib/anycable/rails/{compatibility/rubocop → rubocop}/cops/anycable/stream_from.rb +3 -5
- data/lib/anycable/rails/rubocop.rb +27 -0
- data/lib/anycable/rails/version.rb +1 -1
- data/lib/anycable/rails.rb +2 -1
- data/lib/generators/anycable/bin/templates/bin/anycable-go.tt +5 -0
- data/lib/generators/anycable/download/download_generator.rb +16 -5
- data/lib/generators/anycable/setup/setup_generator.rb +280 -38
- data/lib/generators/anycable/setup/templates/Procfile.dev.tt +2 -2
- data/lib/generators/anycable/setup/templates/anycable.toml.tt +81 -0
- data/lib/generators/anycable/setup/templates/bin/anycable-go.tt +5 -0
- data/lib/generators/anycable/setup/templates/bin/dev +17 -0
- data/lib/generators/anycable/setup/templates/config/anycable.yml.tt +20 -33
- data/lib/generators/anycable/setup/templates/config/cable.yml.tt +2 -5
- metadata +27 -16
- data/lib/anycable/rails/action_cable_ext/signed_streams.rb +0 -31
- /data/lib/anycable/rails/{compatibility/rubocop → rubocop}/config/default.yml +0 -0
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: anycable-rails-core
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- palkan
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-04-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: anycable-core
|
|
@@ -16,34 +16,34 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 1.
|
|
19
|
+
version: 1.6.0
|
|
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: 1.
|
|
26
|
+
version: 1.6.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: actioncable
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
33
|
+
version: '7.0'
|
|
34
34
|
- - "<"
|
|
35
35
|
- !ruby/object:Gem::Version
|
|
36
|
-
version: '
|
|
36
|
+
version: '9.0'
|
|
37
37
|
type: :runtime
|
|
38
38
|
prerelease: false
|
|
39
39
|
version_requirements: !ruby/object:Gem::Requirement
|
|
40
40
|
requirements:
|
|
41
41
|
- - ">="
|
|
42
42
|
- !ruby/object:Gem::Version
|
|
43
|
-
version: '
|
|
43
|
+
version: '7.0'
|
|
44
44
|
- - "<"
|
|
45
45
|
- !ruby/object:Gem::Version
|
|
46
|
-
version: '
|
|
46
|
+
version: '9.0'
|
|
47
47
|
- !ruby/object:Gem::Dependency
|
|
48
48
|
name: globalid
|
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -77,14 +77,11 @@ files:
|
|
|
77
77
|
- lib/anycable/rails/action_cable_ext/channel.rb
|
|
78
78
|
- lib/anycable/rails/action_cable_ext/connection.rb
|
|
79
79
|
- lib/anycable/rails/action_cable_ext/remote_connections.rb
|
|
80
|
-
- lib/anycable/rails/
|
|
80
|
+
- lib/anycable/rails/channel.rb
|
|
81
|
+
- lib/anycable/rails/channel/presence.rb
|
|
81
82
|
- lib/anycable/rails/channel_state.rb
|
|
82
83
|
- lib/anycable/rails/compatibility.rb
|
|
83
84
|
- lib/anycable/rails/compatibility/rubocop.rb
|
|
84
|
-
- lib/anycable/rails/compatibility/rubocop/config/default.yml
|
|
85
|
-
- lib/anycable/rails/compatibility/rubocop/cops/anycable/instance_vars.rb
|
|
86
|
-
- lib/anycable/rails/compatibility/rubocop/cops/anycable/periodical_timers.rb
|
|
87
|
-
- lib/anycable/rails/compatibility/rubocop/cops/anycable/stream_from.rb
|
|
88
85
|
- lib/anycable/rails/config.rb
|
|
89
86
|
- lib/anycable/rails/connection.rb
|
|
90
87
|
- lib/anycable/rails/connection_factory.rb
|
|
@@ -93,13 +90,24 @@ files:
|
|
|
93
90
|
- lib/anycable/rails/connections/session_proxy.rb
|
|
94
91
|
- lib/anycable/rails/ext.rb
|
|
95
92
|
- lib/anycable/rails/ext/jwt.rb
|
|
93
|
+
- lib/anycable/rails/ext/signed_streams.rb
|
|
94
|
+
- lib/anycable/rails/ext/whisper.rb
|
|
96
95
|
- lib/anycable/rails/helper.rb
|
|
97
96
|
- lib/anycable/rails/middlewares/executor.rb
|
|
98
97
|
- lib/anycable/rails/middlewares/log_tagging.rb
|
|
98
|
+
- lib/anycable/rails/next/action_cable_ext/channel.rb
|
|
99
|
+
- lib/anycable/rails/next/action_cable_ext/connection.rb
|
|
100
|
+
- lib/anycable/rails/next/connection.rb
|
|
101
|
+
- lib/anycable/rails/next/connection/persistent_session.rb
|
|
99
102
|
- lib/anycable/rails/object_serializer.rb
|
|
100
103
|
- lib/anycable/rails/pubsub_channel.rb
|
|
101
104
|
- lib/anycable/rails/rack.rb
|
|
102
105
|
- lib/anycable/rails/railtie.rb
|
|
106
|
+
- lib/anycable/rails/rubocop.rb
|
|
107
|
+
- lib/anycable/rails/rubocop/config/default.yml
|
|
108
|
+
- lib/anycable/rails/rubocop/cops/anycable/instance_vars.rb
|
|
109
|
+
- lib/anycable/rails/rubocop/cops/anycable/periodical_timers.rb
|
|
110
|
+
- lib/anycable/rails/rubocop/cops/anycable/stream_from.rb
|
|
103
111
|
- lib/anycable/rails/socket_id_tracking.rb
|
|
104
112
|
- lib/anycable/rails/version.rb
|
|
105
113
|
- lib/generators/anycable/bin/USAGE
|
|
@@ -110,7 +118,9 @@ files:
|
|
|
110
118
|
- lib/generators/anycable/setup/USAGE
|
|
111
119
|
- lib/generators/anycable/setup/setup_generator.rb
|
|
112
120
|
- lib/generators/anycable/setup/templates/Procfile.dev.tt
|
|
121
|
+
- lib/generators/anycable/setup/templates/anycable.toml.tt
|
|
113
122
|
- lib/generators/anycable/setup/templates/bin/anycable-go.tt
|
|
123
|
+
- lib/generators/anycable/setup/templates/bin/dev
|
|
114
124
|
- lib/generators/anycable/setup/templates/config/anycable.yml.tt
|
|
115
125
|
- lib/generators/anycable/setup/templates/config/cable.yml.tt
|
|
116
126
|
- lib/generators/anycable/with_os_helpers.rb
|
|
@@ -124,7 +134,8 @@ metadata:
|
|
|
124
134
|
homepage_uri: https://anycable.io/
|
|
125
135
|
source_code_uri: http://github.com/anycable/anycable-rails
|
|
126
136
|
funding_uri: https://github.com/sponsors/anycable
|
|
127
|
-
|
|
137
|
+
rubygems_mfa_required: 'true'
|
|
138
|
+
post_install_message:
|
|
128
139
|
rdoc_options: []
|
|
129
140
|
require_paths:
|
|
130
141
|
- lib
|
|
@@ -140,7 +151,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
140
151
|
version: '0'
|
|
141
152
|
requirements: []
|
|
142
153
|
rubygems_version: 3.4.19
|
|
143
|
-
signing_key:
|
|
154
|
+
signing_key:
|
|
144
155
|
specification_version: 4
|
|
145
156
|
summary: AnyCable integration for Rails (w/o RPC dependencies)
|
|
146
157
|
test_files: []
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
require "action_cable"
|
|
4
|
-
|
|
5
|
-
ActionCable::Connection::Base.include(Module.new do
|
|
6
|
-
# This method is assumed to be overriden in the connection class to enable public
|
|
7
|
-
# streams
|
|
8
|
-
def allow_public_streams?
|
|
9
|
-
false
|
|
10
|
-
end
|
|
11
|
-
end)
|
|
12
|
-
|
|
13
|
-
# Handle $pubsub channel in Subscriptions
|
|
14
|
-
ActionCable::Connection::Subscriptions.prepend(Module.new do
|
|
15
|
-
# The contents are mostly copied from the original,
|
|
16
|
-
# there is no good way to configure channels mapping due to #safe_constantize
|
|
17
|
-
# and the layers of JSON
|
|
18
|
-
# https://github.com/rails/rails/blob/main/actioncable/lib/action_cable/connection/subscriptions.rb
|
|
19
|
-
def add(data)
|
|
20
|
-
id_key = data["identifier"]
|
|
21
|
-
id_options = ActiveSupport::JSON.decode(id_key).with_indifferent_access
|
|
22
|
-
|
|
23
|
-
return if subscriptions.key?(id_key)
|
|
24
|
-
|
|
25
|
-
return super unless id_options[:channel] == "$pubsub"
|
|
26
|
-
|
|
27
|
-
subscription = AnyCable::Rails::PubSubChannel.new(connection, id_key, id_options)
|
|
28
|
-
subscriptions[id_key] = subscription
|
|
29
|
-
subscription.subscribe_to_channel
|
|
30
|
-
end
|
|
31
|
-
end)
|
|
File without changes
|