mirror of
https://github.com/meineerde/redmine.git
synced 2026-02-01 03:57:15 +00:00
Updates propshaft to 1.3.
Patch by Takashi Kato (user:tohosaku). git-svn-id: https://svn.redmine.org/redmine/trunk@24074 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
31ce3c99c2
commit
8669c87b94
2
Gemfile
2
Gemfile
@ -14,7 +14,7 @@ gem 'i18n', '~> 1.14.1'
|
||||
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"
|
||||
|
||||
@ -1744,7 +1744,8 @@ module ApplicationHelper
|
||||
# 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
|
||||
@ -1778,7 +1779,8 @@ module ApplicationHelper
|
||||
# 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
|
||||
|
||||
@ -135,7 +135,11 @@ module Redmine
|
||||
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
|
||||
@ -172,7 +176,7 @@ module Redmine
|
||||
@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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user