Skip to content

Commit

Permalink
Don't add bin/thrust if thruster is not in Gemfile
Browse files Browse the repository at this point in the history
  • Loading branch information
etiennebarrie committed Nov 8, 2024
1 parent 1b4c73e commit c050cad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions railties/lib/rails/commands/app/update_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ def generator_options
skip_action_cable: !defined?(ActionCable::Engine),
skip_brakeman: skip_gem?("brakeman"),
skip_rubocop: skip_gem?("rubocop"),
skip_thruster: skip_gem?("thruster"),
skip_test: !defined?(Rails::TestUnitRailtie),
skip_system_test: Rails.application.config.generators.system_tests.nil?,
skip_asset_pipeline: asset_pipeline.nil?,
Expand Down
10 changes: 10 additions & 0 deletions railties/test/generators/app_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,16 @@ def test_app_update_preserves_skip_rubocop
end
end

def test_app_update_preserves_skip_thruster
run_generator [ destination_root, "--skip-thruster" ]

FileUtils.cd(destination_root) do
assert_no_changes -> { File.exist?("bin/thrust") } do
run_app_update
end
end
end

def test_app_update_preserves_skip_test
run_generator [ destination_root, "--skip-test" ]

Expand Down

0 comments on commit c050cad

Please sign in to comment.