anycable-rails 1.1.0.pre1 → 1.1.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 +28 -1
- data/README.md +5 -5
- data/lib/anycable/rails/actioncable/connection.rb +1 -1
- data/lib/anycable/rails/config.rb +6 -1
- data/lib/anycable/rails/middlewares/log_tagging.rb +2 -2
- data/lib/anycable/rails/railtie.rb +10 -0
- data/lib/anycable/rails/version.rb +1 -1
- data/lib/generators/anycable/setup/setup_generator.rb +3 -3
- metadata +10 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 685b7383d4271b532926db2d03a03d5601ee3e17d0b3215a61a675fcbe88b04f
|
4
|
+
data.tar.gz: b7472589e36cff91a90cd0a8735aebcc50d269c52a357e6ac39a22a1cd6f90b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: df90a5b6cbde849fe23765fb8b42632d891d849b0cd8a6d867c0fcfcaa0e11d9504859b6842ffeb600eaec429cf6551a2e14546628f1786ca8f0cc0bccebb55c
|
7
|
+
data.tar.gz: cbf7b61205381c41c6556a32916f30c2d2beb24af62fe742cd151b314b0209393278fa229a1c84fd6484e0584b53f32a0d238d2a3bbe23cdd422e09c41bb31d0
|
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,34 @@
|
|
2
2
|
|
3
3
|
## master
|
4
4
|
|
5
|
-
## 1.1.
|
5
|
+
## 1.1.2 (2021-06-23)
|
6
|
+
|
7
|
+
- Bring back dependency on `anycable` (instead of `anycable-core`). ([@palkan][])
|
8
|
+
|
9
|
+
Make it easier to get started by adding just a single gem.
|
10
|
+
|
11
|
+
## 1.1.1 (2021-06-08)
|
12
|
+
|
13
|
+
- Updated documentation links in the generator. ([@palkan][])
|
14
|
+
|
15
|
+
## 1.1.0 🚸 (2021-06-01)
|
16
|
+
|
17
|
+
- No changes since 1.1.0.rc1.1.
|
18
|
+
|
19
|
+
## 1.1.0.rc1.1 (2021-05-12)
|
20
|
+
|
21
|
+
- Fixed config loading regression introduced in 1.1.0.rc1.
|
22
|
+
|
23
|
+
## 1.1.0.rc1 (2021-05-12)
|
24
|
+
|
25
|
+
- Adding `anycable` or `grpc` gem as an explicit dependency is required.
|
26
|
+
|
27
|
+
Now, `anycable-rails` depends on `anycable-core`, which doesn't include gRPC server implementation.
|
28
|
+
You should either add `anycable` or `grpc` (>= 1.37) gem as an explicit dependency.
|
29
|
+
|
30
|
+
- Add option to embed AnyCable RPC into a Rails server process. ([@palkan][])
|
31
|
+
|
32
|
+
Set `embedded: true` in the configuration to launch RPC along with `rails s` (only for Rails 6.1+).
|
6
33
|
|
7
34
|
- **Ruby >= 2.6** is required.
|
8
35
|
- **Rails >= 6.0** is required.
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
[](https://rubygems.org/gems/anycable-rails)
|
2
2
|
[](https://github.com/anycable/anycable-rails/actions)
|
3
3
|
[](https://gitter.im/anycable/Lobby)
|
4
|
-
[](https://docs.anycable.io
|
4
|
+
[](https://docs.anycable.io/rails/getting_started)
|
5
5
|
|
6
6
|
# AnyCable Rails
|
7
7
|
|
@@ -13,7 +13,7 @@ You can even use Action Cable in development and not be afraid of [compatibility
|
|
13
13
|
|
14
14
|
💾 [Example Application](https://github.com/anycable/anycable_rails_demo)
|
15
15
|
|
16
|
-
📑 [Documentation](https://docs.anycable.io
|
16
|
+
📑 [Documentation](https://docs.anycable.io/rails/getting_started).
|
17
17
|
|
18
18
|
<a href="https://evilmartians.com/">
|
19
19
|
<img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54"></a>
|
@@ -80,17 +80,17 @@ $ bundle exec anycable
|
|
80
80
|
$ RAILS_ENV=production bundle exec anycable
|
81
81
|
```
|
82
82
|
|
83
|
-
And, finally, run AnyCable WebSocket server, e.g. [anycable-go](https://docs.anycable.io
|
83
|
+
And, finally, run AnyCable WebSocket server, e.g. [anycable-go](https://docs.anycable.io/anycable-go/getting_started):
|
84
84
|
|
85
85
|
```sh
|
86
86
|
anycable-go --host=localhost --port=8080
|
87
87
|
```
|
88
88
|
|
89
|
-
See [documentation](https://docs.anycable.io
|
89
|
+
See [documentation](https://docs.anycable.io/rails/getting_started) for more information on AnyCable + Rails usage.
|
90
90
|
|
91
91
|
## Action Cable Compatibility
|
92
92
|
|
93
|
-
See [documentation](https://docs.anycable.io
|
93
|
+
See [documentation](https://docs.anycable.io/rails/compatibility).
|
94
94
|
|
95
95
|
## Contributing
|
96
96
|
|
@@ -71,7 +71,7 @@ module ActionCable
|
|
71
71
|
|
72
72
|
def invalid_request_message
|
73
73
|
"You're trying to connect to Action Cable server while using AnyCable. " \
|
74
|
-
"See https://docs.anycable.io
|
74
|
+
"See https://docs.anycable.io/troubleshooting?id=server-raises-an-argumenterror-exception-when-client-tries-to-connect"
|
75
75
|
end
|
76
76
|
|
77
77
|
def handle_open
|
@@ -1,12 +1,17 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "anycable/config"
|
4
|
+
# Make sure Rails extensions for Anyway Config are loaded
|
5
|
+
# See https://github.com/anycable/anycable-rails/issues/63
|
6
|
+
require "anyway/rails"
|
4
7
|
|
5
8
|
# Extend AnyCable configuration with:
|
6
9
|
# - `access_logs_disabled` (defaults to true) — whether to print Started/Finished logs
|
7
10
|
# - `persistent_session_enabled` (defaults to false) — whether to store session changes in the connection state
|
11
|
+
# - `embedded` (defaults to false) — whether to run RPC server inside a Rails server process
|
8
12
|
AnyCable::Config.attr_config(
|
9
13
|
access_logs_disabled: true,
|
10
|
-
persistent_session_enabled: false
|
14
|
+
persistent_session_enabled: false,
|
15
|
+
embedded: false
|
11
16
|
)
|
12
17
|
AnyCable::Config.ignore_options :access_logs_disabled, :persistent_session_enabled
|
@@ -9,8 +9,8 @@ module AnyCable
|
|
9
9
|
#
|
10
10
|
# See https://github.com/grpc/grpc-go/blob/master/Documentation/grpc-metadata.md
|
11
11
|
class LogTagging < AnyCable::Middleware
|
12
|
-
def call(
|
13
|
-
sid =
|
12
|
+
def call(_method, _request, metadata)
|
13
|
+
sid = metadata["sid"]
|
14
14
|
return yield unless sid
|
15
15
|
|
16
16
|
AnyCable.logger.tagged("AnyCable sid=#{sid}") { yield }
|
@@ -8,7 +8,7 @@ module AnyCableRailsGenerators
|
|
8
8
|
namespace "anycable:setup"
|
9
9
|
source_root File.expand_path("templates", __dir__)
|
10
10
|
|
11
|
-
DOCS_ROOT = "https://docs.anycable.io
|
11
|
+
DOCS_ROOT = "https://docs.anycable.io"
|
12
12
|
DEVELOPMENT_METHODS = %w[skip local docker].freeze
|
13
13
|
SERVER_SOURCES = %w[skip brew binary].freeze
|
14
14
|
|
@@ -118,7 +118,7 @@ module AnyCableRailsGenerators
|
|
118
118
|
def stimulus_reflex
|
119
119
|
return unless stimulus_reflex?
|
120
120
|
|
121
|
-
say_status :help, "⚠️ Please, check out the documentation on using AnyCable with Stimulus Reflex:
|
121
|
+
say_status :help, "⚠️ Please, check out the documentation on using AnyCable with Stimulus Reflex: #{DOCS_ROOT}/rails/stimulus_reflex"
|
122
122
|
end
|
123
123
|
|
124
124
|
def rubocop_compatibility
|
@@ -126,7 +126,7 @@ module AnyCableRailsGenerators
|
|
126
126
|
|
127
127
|
say_status :info, "🤖 Running static compatibility checks with RuboCop"
|
128
128
|
res = run "bundle exec rubocop -r 'anycable/rails/compatibility/rubocop' --only AnyCable/InstanceVars,AnyCable/PeriodicalTimers,AnyCable/InstanceVars"
|
129
|
-
say_status :help, "⚠️ Please, take a look at the icompatibilities above and fix them. See
|
129
|
+
say_status :help, "⚠️ Please, take a look at the icompatibilities above and fix them. See #{DOCS_ROOT}/rails/compatibility" unless res
|
130
130
|
end
|
131
131
|
|
132
132
|
def finish
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anycable-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- palkan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: anycable
|
14
|
+
name: anycable
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.1
|
19
|
+
version: '1.1'
|
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.1
|
26
|
+
version: '1.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: actioncable
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -189,6 +189,7 @@ metadata:
|
|
189
189
|
documentation_uri: https://docs.anycable.io/#/using_with_rails
|
190
190
|
homepage_uri: https://anycable.io/
|
191
191
|
source_code_uri: http://github.com/anycable/anycable-rails
|
192
|
+
funding_uri: https://github.com/sponsors/anycable
|
192
193
|
post_install_message:
|
193
194
|
rdoc_options: []
|
194
195
|
require_paths:
|
@@ -200,9 +201,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
200
201
|
version: '2.6'
|
201
202
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
202
203
|
requirements:
|
203
|
-
- - "
|
204
|
+
- - ">="
|
204
205
|
- !ruby/object:Gem::Version
|
205
|
-
version:
|
206
|
+
version: '0'
|
206
207
|
requirements: []
|
207
208
|
rubygems_version: 3.2.15
|
208
209
|
signing_key:
|