Revision f728bfd4
Added by Eric Helms almost 6 years ago
lib/tasks/plugin_assets.rake | ||
---|---|---|
def initialize(plugin_id)
|
||
@plugin = Foreman::Plugin.find(plugin_id) or raise("Unable to find registered plugin #{plugin_id}")
|
||
|
||
Rails.env = 'production'
|
||
app = Rails.application
|
||
app.config.assets.digest = true
|
||
app.config.assets.precompile = plugin.assets
|
||
app.config.assets.paths = app.config.assets.paths.select { |path| path.to_s.include?(plugin_id) }
|
||
|
||
super(Rails.application)
|
||
end
|
Also available in: Unified diff
Fixes #23952 - Include all asset paths when precompiling plugins (#5699)