Skip to content

Commit 3e7771c

Browse files
Merge pull request rails#50185 from jonathanhefner/app_generator-quiet-bundle-install
Use `--quiet` for `bundle install`
2 parents 0c5edcc + 11f418f commit 3e7771c

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

railties/lib/rails/generators/app_base.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ def target_rails_prerelease(self_command = "new")
680680
end
681681

682682
def run_bundle
683-
bundle_command("install", "BUNDLE_IGNORE_MESSAGES" => "1") if bundle_install?
683+
bundle_command("install --quiet", "BUNDLE_IGNORE_MESSAGES" => "1") if bundle_install?
684684
end
685685

686686
def run_javascript

railties/test/generators/app_generator_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ def test_generation_runs_bundle_install
680680
generator([destination_root])
681681
run_generator_instance
682682

683-
assert_equal 1, @bundle_commands.count("install")
683+
assert_not_empty @bundle_commands.grep(/^install/)
684684
end
685685

686686
def test_generation_runs_bundle_lock_for_linux

railties/test/generators/plugin_generator_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ def test_no_duplicate_gemfile_entries_when_using_prerelease
244244
end
245245
end
246246

247-
def test_generation_runs_bundle_install
247+
def test_generation_does_not_run_bundle_install
248248
generator([destination_root])
249249
run_generator_instance
250250

railties/test/generators/shared_generator_tests.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -414,10 +414,10 @@ def run_generator_using_prerelease(args)
414414
end
415415

416416
assert_file File.expand_path("Gemfile", project_path) do |gemfile|
417-
assert_equal "install", prerelease_commands[0]
417+
assert_match %r/^install/, prerelease_commands[0]
418418
assert_equal gemfile[rails_gem_pattern], prerelease_command_rails_gems[0]
419419

420-
assert_match %r"^exec rails (?:plugin )?new #{Regexp.escape Shellwords.join(expected_args)}", prerelease_commands[1]
420+
assert_match %r/^exec rails (?:plugin )?new #{Regexp.escape Shellwords.join(expected_args)}/, prerelease_commands[1]
421421
assert_equal gemfile[rails_gem_pattern], prerelease_command_rails_gems[1]
422422
end
423423
end

0 commit comments

Comments
 (0)