From eaba64d6062f77fdf8fce76b2a82d7a07cb99271 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 31 Jul 2024 20:09:16 +0000 Subject: [PATCH 1/2] Fix deprecation warning in Rails 8.0 Use the keyword argument `at:` instead of the positional argument for mounting the assets in the Rails application. --- lib/sprockets/railtie.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sprockets/railtie.rb b/lib/sprockets/railtie.rb index 7058a19a..5f579e9c 100644 --- a/lib/sprockets/railtie.rb +++ b/lib/sprockets/railtie.rb @@ -222,7 +222,7 @@ def self.build_manifest(app) if config.assets.compile app.assets = self.build_environment(app, true) app.routes.prepend do - mount app.assets => config.assets.prefix + mount app.assets, at: config.assets.prefix end end From 6245157651ae5fe9561ce2fc52a942f68e4540b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Wed, 31 Jul 2024 20:10:55 +0000 Subject: [PATCH 2/2] Remove deprecations in Rails applications --- test/test_quiet_assets.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test_quiet_assets.rb b/test/test_quiet_assets.rb index 1a07b806..cca29413 100644 --- a/test/test_quiet_assets.rb +++ b/test/test_quiet_assets.rb @@ -21,6 +21,7 @@ def setup @app = Class.new(Rails::Application) @app.config.eager_load = false @app.config.logger = ActiveSupport::Logger.new("/dev/null") + @app.config.active_support.to_time_preserves_timezone = :zone FileUtils.mkdir_p(ASSET_PATH) File.open(ASSET_PATH.join("manifest.js"), "w") { |f| f << "" }