Skip to content

Commit 9dc752e

Browse files
committed
Don't add bin/thrust if thruster is not in Gemfile
1 parent 1b4c73e commit 9dc752e

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

railties/lib/rails/commands/app/update_command.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def generator_options
7171
skip_action_cable: !defined?(ActionCable::Engine),
7272
skip_brakeman: skip_gem?("brakeman"),
7373
skip_rubocop: skip_gem?("rubocop"),
74+
skip_thruster: skip_gem?("thruster"),
7475
skip_test: !defined?(Rails::TestUnitRailtie),
7576
skip_system_test: Rails.application.config.generators.system_tests.nil?,
7677
skip_asset_pipeline: asset_pipeline.nil?,

railties/test/generators/app_generator_test.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,16 @@ def test_app_update_preserves_skip_rubocop
304304
end
305305
end
306306

307+
def test_app_update_preserves_skip_thruster
308+
run_generator [ destination_root, "--skip-thruster" ]
309+
310+
FileUtils.cd(destination_root) do
311+
assert_no_changes -> { File.exist?("bin/thrust") } do
312+
run_app_update
313+
end
314+
end
315+
end
316+
307317
def test_app_update_preserves_skip_test
308318
run_generator [ destination_root, "--skip-test" ]
309319

0 commit comments

Comments
 (0)