anycable-rails-core 1.6.1 → 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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ae5f5e00ae334a317de5b59685ff57de668c2f102125f48bc8309a7330787950
|
|
4
|
+
data.tar.gz: f15f057412a3c0a0dbf759bd8c8d47abee1bee60a9b68ca62983ced577ea9397
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8b780c7ca124e8f84d708e94ec78a27b50e9b36cbf524264cea3582bb171b037e40f4f92d8292f115810b988dfe93d45a942c779550943484bfad9810c1865f3
|
|
7
|
+
data.tar.gz: 916571c822234a92ec9bbb1839c06c8a0cc9a6f434c370c0b9bccd6486a450c2dc2ec88e27069d3b14bff093e245d0a83e6aed71fc7bcd1f20b298ae479edde7
|
data/CHANGELOG.md
CHANGED
|
@@ -9,7 +9,7 @@ module AnyCableRailsGenerators
|
|
|
9
9
|
source_root File.expand_path("templates", __dir__)
|
|
10
10
|
|
|
11
11
|
DOCS_ROOT = "https://docs.anycable.io"
|
|
12
|
-
DEVELOPMENT_METHODS = %w[skip
|
|
12
|
+
DEVELOPMENT_METHODS = %w[skip bin docker].freeze
|
|
13
13
|
DEPLOYMENT_METHODS = %w[skip thruster fly heroku anycable_plus].freeze
|
|
14
14
|
RPC_IMPL = %w[none grpc http].freeze
|
|
15
15
|
|
|
@@ -41,7 +41,7 @@ module AnyCableRailsGenerators
|
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
if hotwire? && !custom_channels?
|
|
44
|
-
|
|
44
|
+
say_status :info, <<~MSG
|
|
45
45
|
⚡️ Hotwire application has been detected, installing AnyCable in a standalone mode.
|
|
46
46
|
MSG
|
|
47
47
|
@rpc_impl = "none"
|
|
@@ -52,6 +52,7 @@ module AnyCableRailsGenerators
|
|
|
52
52
|
answer = RPC_IMPL.index(options[:rpc]) || 99
|
|
53
53
|
|
|
54
54
|
unless RPC_IMPL[answer.to_i]
|
|
55
|
+
say ""
|
|
55
56
|
say <<~MSG
|
|
56
57
|
AnyCable connects to your Rails server to communicate with Action Cable channels either via HTTP or gRPC.
|
|
57
58
|
|
|
@@ -68,15 +69,14 @@ module AnyCableRailsGenerators
|
|
|
68
69
|
say ""
|
|
69
70
|
end
|
|
70
71
|
|
|
71
|
-
|
|
72
|
-
answer = ask "Which RPC implementation would you like to use? (1) gRPC, (2) HTTP, (0) None"
|
|
73
|
-
end
|
|
72
|
+
answer = ask "Which RPC implementation would you like to use?", limited_to: %w[grpc http none], default: "grpc"
|
|
74
73
|
|
|
75
|
-
@rpc_impl =
|
|
74
|
+
@rpc_impl = answer
|
|
75
|
+
return
|
|
76
76
|
end
|
|
77
77
|
|
|
78
78
|
# no Hotwire, no custom channels
|
|
79
|
-
|
|
79
|
+
say_status :info, "Looks like you don't have any real-time functionality yet. Let's start with a miminal AnyCable setup!"
|
|
80
80
|
@rpc_impl = "none"
|
|
81
81
|
end
|
|
82
82
|
|
|
@@ -87,10 +87,11 @@ module AnyCableRailsGenerators
|
|
|
87
87
|
|
|
88
88
|
# Fast-track for local development
|
|
89
89
|
if file_exists?("bin/dev") && file_exists?("Procfile.dev")
|
|
90
|
-
@development = "
|
|
90
|
+
@development = "bin"
|
|
91
91
|
end
|
|
92
92
|
|
|
93
93
|
unless @development
|
|
94
|
+
say ""
|
|
94
95
|
say <<~MSG
|
|
95
96
|
You can run AnyCable server locally (recommended for most cases) or as a Docker container (in case you develop in a containerized environment).
|
|
96
97
|
|
|
@@ -99,15 +100,9 @@ module AnyCableRailsGenerators
|
|
|
99
100
|
MSG
|
|
100
101
|
say ""
|
|
101
102
|
|
|
102
|
-
answer =
|
|
103
|
-
|
|
104
|
-
until DEVELOPMENT_METHODS[answer.to_i]
|
|
105
|
-
answer = ask <<~MSG
|
|
106
|
-
Which way to run AnyCable server locally would you prefer? (1) Binstub, (2) Docker, (0) Skip
|
|
107
|
-
MSG
|
|
108
|
-
end
|
|
103
|
+
answer = ask "Which way to run AnyCable server locally would you prefer?", limited_to: %w[bin docker skip], default: "bin"
|
|
109
104
|
|
|
110
|
-
@development =
|
|
105
|
+
@development = answer
|
|
111
106
|
end
|
|
112
107
|
|
|
113
108
|
case @development
|
|
@@ -135,7 +130,7 @@ module AnyCableRailsGenerators
|
|
|
135
130
|
res = run "bundle exec rubocop -r 'anycable/rails/compatibility/rubocop' --only AnyCable/InstanceVars,AnyCable/PeriodicalTimers,AnyCable/InstanceVars"
|
|
136
131
|
|
|
137
132
|
unless res
|
|
138
|
-
say_status :help, "⚠️ Please, take a look at the
|
|
133
|
+
say_status :help, "⚠️ Please, take a look at the incompatibilities above and fix them"
|
|
139
134
|
|
|
140
135
|
@todos << "Fix Action Cable compatibility issues (listed above): #{DOCS_ROOT}/rails/compatibility"
|
|
141
136
|
end
|
|
@@ -402,7 +397,7 @@ module AnyCableRailsGenerators
|
|
|
402
397
|
end
|
|
403
398
|
end
|
|
404
399
|
|
|
405
|
-
def
|
|
400
|
+
def install_for_bin
|
|
406
401
|
unless file_exists?("bin/anycable-go")
|
|
407
402
|
generate "anycable:bin", "--version #{options[:version]}"
|
|
408
403
|
end
|
|
@@ -519,13 +514,10 @@ module AnyCableRailsGenerators
|
|
|
519
514
|
def install_js_packages
|
|
520
515
|
if file_exists?("config/importmap.rb") && file_exists?("bin/importmap")
|
|
521
516
|
run "bin/importmap pin @hotwired/turbo @anycable/web @anycable/turbo-stream"
|
|
522
|
-
true
|
|
523
517
|
elsif file_exists?("yarn.lock")
|
|
524
518
|
run "yarn add @anycable/web @anycable/turbo-stream"
|
|
525
|
-
true
|
|
526
519
|
elsif file_exists?("package-json.lock")
|
|
527
520
|
run "npm install @anycable/web @anycable/turbo-stream"
|
|
528
|
-
true
|
|
529
521
|
else
|
|
530
522
|
false
|
|
531
523
|
end
|
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.6.
|
|
4
|
+
version: 1.6.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- palkan
|
|
8
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
|
|
@@ -134,6 +134,7 @@ metadata:
|
|
|
134
134
|
homepage_uri: https://anycable.io/
|
|
135
135
|
source_code_uri: http://github.com/anycable/anycable-rails
|
|
136
136
|
funding_uri: https://github.com/sponsors/anycable
|
|
137
|
+
rubygems_mfa_required: 'true'
|
|
137
138
|
post_install_message:
|
|
138
139
|
rdoc_options: []
|
|
139
140
|
require_paths:
|