Project

General

Profile

Patch #43396 » 0001-Update-propshaft-to-1.3.patch

Takashi Kato, 2025-10-26 08:40

View differences:

Gemfile
gem 'rbpdf', '~> 1.21.4'
gem 'addressable'
gem 'rubyzip', '~> 3.1.1'
gem 'propshaft', '~> 1.1.0'
gem 'propshaft', '~> 1.3.0'
gem 'rack', '>= 3.1.3'
gem "stimulus-rails", "~> 1.3"
gem "importmap-rails", "~> 2.0"
app/helpers/application_helper.rb
# stylesheet_link_tag('styles', :plugin => 'foo) # => picks styles.css from plugin's assets
#
def stylesheet_link_tag(*sources)
options = sources.last.is_a?(Hash) ? sources.pop : {}
# option keys is converted to a string in Propshaft::Helper.
options = sources.last.is_a?(Hash) ? sources.pop.symbolize_keys : {}
plugin = options.delete(:plugin)
sources = sources.map do |source|
if plugin
......
# javascript_include_tag('scripts', :plugin => 'foo) # => picks scripts.js from plugin's assets
#
def javascript_include_tag(*sources)
options = sources.last.is_a?(Hash) ? sources.pop : {}
# option keys is converted to a string in Propshaft::Helper.
options = sources.last.is_a?(Hash) ? sources.pop.symbolize_keys : {}
if plugin = options.delete(:plugin)
sources = sources.map do |source|
if plugin
lib/redmine/asset_path.rb
def initialize(config, compilers)
@extension_paths = config.redmine_extension_paths
@default_asset_path = config.redmine_default_asset_path
super(config.paths, compilers: compilers, version: config.version)
super(config.paths,
compilers: compilers,
version: config.version,
file_watcher: config.file_watcher,
integrity_hash_algorithm: config.integrity_hash_algorithm)
end
def asset_files
......
@cache_sweeper ||= begin
exts_to_watch = Mime::EXTENSION_LOOKUP.map(&:first)
files_to_watch = Array(all_paths).to_h { |dir| [dir.to_s, exts_to_watch] }
Rails.application.config.file_watcher.new([], files_to_watch) do
@file_watcher.new([], files_to_watch) do
clear_cache
end
end
(1-1/3)