From ae69c01247d83c6b13714d5ddff173b0b91995a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marius=20B=C4=82LTEANU?= Date: Mon, 28 Oct 2024 23:39:03 +0200 Subject: [PATCH] Updates propshaft gem to 1.1.0 (#39111). diff --git a/Gemfile b/Gemfile index 60633a552..ce9a915bb 100644 --- a/Gemfile +++ b/Gemfile @@ -14,7 +14,7 @@ gem 'i18n', '~> 1.14.1' gem 'rbpdf', '~> 1.21.3' gem 'addressable' gem 'rubyzip', '~> 2.3.0' -gem 'propshaft', '~> 0.8.0' +gem 'propshaft', '~> 1.1.0' gem 'rack', '>= 3.1.3' # Ruby Standard Gems diff --git a/lib/redmine/asset_path.rb b/lib/redmine/asset_path.rb index d425d39f0..4d1cd2bcc 100644 --- a/lib/redmine/asset_path.rb +++ b/lib/redmine/asset_path.rb @@ -34,9 +34,10 @@ module Redmine @transition.add_src intermediate_path, logical_path @transition.add_dest intermediate_path, logical_path asset = if file.extname == '.css' - Redmine::Asset.new(file, logical_path: logical_path, version: version, transition_map: transition_map) + Redmine::Asset.new(file, logical_path: logical_path, version: version, transition_map: transition_map) else - Propshaft::Asset.new(file, logical_path: logical_path, version: version) + load_path = Propshaft::LoadPath.new([ file ], compilers: Propshaft::Compilers.new(nil)) + Propshaft::Asset.new(file, logical_path: logical_path, load_path: load_path) end assets[asset.logical_path.to_s] ||= asset end @@ -135,7 +136,7 @@ module Redmine def initialize(config) @extension_paths = config.redmine_extension_paths @default_asset_path = config.redmine_default_asset_path - super(config.paths, version: config.version) + super(config.paths, version: config.version, compilers: Propshaft::Compilers.new(nil)) end def asset_files @@ -191,7 +192,8 @@ module Redmine class Asset < Propshaft::Asset def initialize(file, logical_path:, version:, transition_map:) @transition_map = transition_map - super(file, logical_path: logical_path, version: version) + load_path = Propshaft::LoadPath.new([ file ], compilers: Propshaft::Compilers.new(nil)) + super(file, logical_path: logical_path, load_path: load_path) end def content -- 2.39.5 (Apple Git-154)