Skip to content

Commit

Permalink
Skip ActionCable for Dummy Apps
Browse files Browse the repository at this point in the history
We don't really use ActionCable for anything as far as I know. Having it
makes installing Turbo/Stimulus in extensions harder.

The installer for Turbo will look for a Gemfile in `Rails.root`, which is not
there in case of the dummy app, and fail. If, however, `config/cable.yml` can't be
found, the Turbo installer succeeds with a message that Turbo is
installed, just without the broadcasting feature (which is alright for
most apps I believe).
  • Loading branch information
mamhoff committed Oct 6, 2023
1 parent 2abc7d3 commit 3f8ad82
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/lib/generators/spree/dummy/dummy_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def generate_test_dummy
opts[:skip_yarn] = true
opts[:skip_bootsnap] = true
opts[:skip_javascript] = true
opts[:skip_action_cable] = true

Check warning on line 47 in core/lib/generators/spree/dummy/dummy_generator.rb

View check run for this annotation

Codecov / codecov/patch

core/lib/generators/spree/dummy/dummy_generator.rb#L47

Added line #L47 was not covered by tests

puts "Generating dummy Rails application..."
invoke Rails::Generators::AppGenerator,
Expand Down

0 comments on commit 3f8ad82

Please sign in to comment.