Skip to content

Commit

Permalink
Put back the quiet assets in development:
Browse files Browse the repository at this point in the history
- This was removed in 0f43fed.
  This option is supported by propshaft.

  Currently, the terminal is clutted with assets request log.
  • Loading branch information
Edouard-chin committed Nov 14, 2024
1 parent 67c6ef2 commit 3ec2fef
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ Rails.application.configure do
# Highlight code that enqueued background job in logs.
config.active_job.verbose_enqueue_logs = true

<%- end -%>
<%- unless options[:skip_asset_pipeline] -%>
# Suppress logger output for asset requests.
config.assets.quiet = true

<%- end -%>
# Raises error for missing translations.
# config.i18n.raise_on_missing_translations = true
Expand Down
5 changes: 5 additions & 0 deletions railties/test/generators/app_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,11 @@ def test_inclusion_of_rubocop
assert_file "config/environments/development.rb", %r|# Apply autocorrection by RuboCop to files generated by `bin/rails generate`\.|
end

def test_quiet_assets_in_development
run_generator
assert_file "config/environments/development.rb", /config\.assets\.quiet = true/
end

def test_rubocop_is_skipped_if_required
run_generator [destination_root, "--skip-rubocop"]

Expand Down
4 changes: 1 addition & 3 deletions railties/test/generators/plugin_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -659,9 +659,7 @@ def test_dummy_application_configures_asset_pipeline_when_full

assert_gem "propshaft"
assert_file "test/dummy/config/initializers/assets.rb"
assert_file "test/dummy/config/environments/development.rb" do |content|
assert_no_match "config.assets", content
end
assert_file "test/dummy/config/environments/development.rb"
end

def test_dummy_application_skips_asset_pipeline_when_flag_skip_asset_pipeline
Expand Down

0 comments on commit 3ec2fef

Please sign in to comment.