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: e1dc965588a4b4f798a031a398319683240bd3319f8e9ce843bc3c0a830e00b2
4
- data.tar.gz: 4e0739d26c204dbb9c04db0f6a6772809e0578b9bdc8a5f95509511351c18fff
3
+ metadata.gz: ae5f5e00ae334a317de5b59685ff57de668c2f102125f48bc8309a7330787950
4
+ data.tar.gz: f15f057412a3c0a0dbf759bd8c8d47abee1bee60a9b68ca62983ced577ea9397
5
5
  SHA512:
6
- metadata.gz: 030a59929994059d44a1db9d3f5a9696c8443cd11a4d54ffb2538fcf0becc1d4bcc473e80610dc6fd4f94508f3c744ea83d348da91442eb1f03806ae4f886d5f
7
- data.tar.gz: aae67b4149566140a102932a22c7716b181745d9b5df92edd60480a5567b9a144857f8f1e23fcc540929bf5163ef0678c753ef4abccd302ed269d731a5e2852a
6
+ metadata.gz: 8b780c7ca124e8f84d708e94ec78a27b50e9b36cbf524264cea3582bb171b037e40f4f92d8292f115810b988dfe93d45a942c779550943484bfad9810c1865f3
7
+ data.tar.gz: 916571c822234a92ec9bbb1839c06c8a0cc9a6f434c370c0b9bccd6486a450c2dc2ec88e27069d3b14bff093e245d0a83e6aed71fc7bcd1f20b298ae479edde7
data/CHANGELOG.md CHANGED
@@ -2,8 +2,12 @@
2
2
 
3
3
  ## main
4
4
 
5
+ ## 1.6.2 (2026-04-02)
6
+
5
7
  - Upgrade setup generator. ([@palkan][])
6
8
 
9
+ ## 1.6.1 (2025-12-18)
10
+
7
11
  - Ensure `bin/dist/anycable-go` has execution permission as part of `bin/anycable-go` ([@dmorgan-fa][])
8
12
 
9
13
  ## 1.6.0 (2025-03-18)
@@ -9,6 +9,7 @@ module AnyCable
9
9
  @_streams
10
10
  @parameter_filter
11
11
  @whisper_stream
12
+ @__sid__
12
13
  ]
13
14
 
14
15
  ActionCable::Channel::Base.prepend(Module.new do
@@ -2,6 +2,6 @@
2
2
 
3
3
  module AnyCable
4
4
  module Rails
5
- VERSION = "1.6.1"
5
+ VERSION = "1.6.2"
6
6
  end
7
7
  end
@@ -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 local docker].freeze
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
- say <<~MSG
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
- until RPC_IMPL[answer.to_i]
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 = RPC_IMPL[answer.to_i]
74
+ @rpc_impl = answer
75
+ return
76
76
  end
77
77
 
78
78
  # no Hotwire, no custom channels
79
- say "Looks like you don't have any real-time functionality yet. Let's start with a miminal AnyCable setup!"
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 = "local"
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 = DEVELOPMENT_METHODS.index(options[:development]) || 99
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 = DEVELOPMENT_METHODS[answer.to_i]
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 icompatibilities above and fix them"
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 install_for_local
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
@@ -1,8 +1,5 @@
1
1
  #!/usr/bin/env sh
2
2
 
3
- # Default to port 3000 if not specified
4
- export PORT="${PORT:-3000}"
5
-
6
3
  # Let the debug gem allow remote connections,
7
4
  # but avoid loading until `debugger` is called
8
5
  export RUBY_DEBUG_OPEN="true"
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.1
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: 2025-12-17 00:00:00.000000000 Z
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: