From 46ce3fffc113e35acc04b2919060e2a9d340c758 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 16 Aug 2024 16:19:14 -0400 Subject: [PATCH 1/2] Update Propshaft to 0.9.x changelog: Internal, Dependencies, Update dependencies to latest versions --- Gemfile.lock | 2 +- lib/extensions/propshaft/asset.rb | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) delete mode 100644 lib/extensions/propshaft/asset.rb diff --git a/Gemfile.lock b/Gemfile.lock index ed7ed0c8b91..82808af2c85 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -479,7 +479,7 @@ GEM profanity_filter (0.1.1) prometheus_exporter (2.1.0) webrick - propshaft (0.7.0) + propshaft (0.9.1) actionpack (>= 7.0.0) activesupport (>= 7.0.0) rack diff --git a/lib/extensions/propshaft/asset.rb b/lib/extensions/propshaft/asset.rb deleted file mode 100644 index 7acc19c3758..00000000000 --- a/lib/extensions/propshaft/asset.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -# Monkey-patch Propshaft::Asset to produce a shorter digest as an optimization to built output size. -# -# See: https://github.com/rails/propshaft/blob/main/lib/propshaft/asset.rb - -module Extensions - Propshaft::Asset.class_eval do - def digest - @digest ||= Digest::SHA1.hexdigest("#{content}#{version}")[0...8] - end - end -end From d4f442e19bb4fa2c8b4ccab2d67eacef81c69883 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Fri, 16 Aug 2024 16:28:13 -0400 Subject: [PATCH 2/2] Remove monkeypatch file reference --- config/initializers/assets.rb | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 6f1ca9f3022..4f2630bea56 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -2,8 +2,6 @@ # Be sure to restart your server when you modify this file. -require 'extensions/propshaft/asset' - # Version of your assets, change this if you want to expire all your assets. Rails.application.config.assets.version = '1.0'