Patch #43396 ยป 0001-Update-propshaft-to-1.3.patch
| Gemfile | ||
|---|---|---|
| 14 | 14 |
gem 'rbpdf', '~> 1.21.4' |
| 15 | 15 |
gem 'addressable' |
| 16 | 16 |
gem 'rubyzip', '~> 3.1.1' |
| 17 |
gem 'propshaft', '~> 1.1.0'
|
|
| 17 |
gem 'propshaft', '~> 1.3.0'
|
|
| 18 | 18 |
gem 'rack', '>= 3.1.3' |
| 19 | 19 |
gem "stimulus-rails", "~> 1.3" |
| 20 | 20 |
gem "importmap-rails", "~> 2.0" |
| app/helpers/application_helper.rb | ||
|---|---|---|
| 1744 | 1744 |
# stylesheet_link_tag('styles', :plugin => 'foo) # => picks styles.css from plugin's assets
|
| 1745 | 1745 |
# |
| 1746 | 1746 |
def stylesheet_link_tag(*sources) |
| 1747 |
options = sources.last.is_a?(Hash) ? sources.pop : {}
|
|
| 1747 |
# option keys is converted to a string in Propshaft::Helper. |
|
| 1748 |
options = sources.last.is_a?(Hash) ? sources.pop.symbolize_keys : {}
|
|
| 1748 | 1749 |
plugin = options.delete(:plugin) |
| 1749 | 1750 |
sources = sources.map do |source| |
| 1750 | 1751 |
if plugin |
| ... | ... | |
| 1778 | 1779 |
# javascript_include_tag('scripts', :plugin => 'foo) # => picks scripts.js from plugin's assets
|
| 1779 | 1780 |
# |
| 1780 | 1781 |
def javascript_include_tag(*sources) |
| 1781 |
options = sources.last.is_a?(Hash) ? sources.pop : {}
|
|
| 1782 |
# option keys is converted to a string in Propshaft::Helper. |
|
| 1783 |
options = sources.last.is_a?(Hash) ? sources.pop.symbolize_keys : {}
|
|
| 1782 | 1784 |
if plugin = options.delete(:plugin) |
| 1783 | 1785 |
sources = sources.map do |source| |
| 1784 | 1786 |
if plugin |
| lib/redmine/asset_path.rb | ||
|---|---|---|
| 135 | 135 |
def initialize(config, compilers) |
| 136 | 136 |
@extension_paths = config.redmine_extension_paths |
| 137 | 137 |
@default_asset_path = config.redmine_default_asset_path |
| 138 |
super(config.paths, compilers: compilers, version: config.version) |
|
| 138 |
super(config.paths, |
|
| 139 |
compilers: compilers, |
|
| 140 |
version: config.version, |
|
| 141 |
file_watcher: config.file_watcher, |
|
| 142 |
integrity_hash_algorithm: config.integrity_hash_algorithm) |
|
| 139 | 143 |
end |
| 140 | 144 | |
| 141 | 145 |
def asset_files |
| ... | ... | |
| 172 | 176 |
@cache_sweeper ||= begin |
| 173 | 177 |
exts_to_watch = Mime::EXTENSION_LOOKUP.map(&:first) |
| 174 | 178 |
files_to_watch = Array(all_paths).to_h { |dir| [dir.to_s, exts_to_watch] }
|
| 175 |
Rails.application.config.file_watcher.new([], files_to_watch) do
|
|
| 179 |
@file_watcher.new([], files_to_watch) do
|
|
| 176 | 180 |
clear_cache |
| 177 | 181 |
end |
| 178 | 182 |
end |