@@ -359,10 +359,14 module Redmine #:nodoc: | |||
|
359 | 359 | end |
|
360 | 360 | end |
|
361 | 361 | |
|
362 |
# Mirrors all plugin |
|
|
363 | def self.mirror_assets | |
|
364 | all.each do |plugin| | |
|
365 |
|
|
|
362 | # Mirrors assets from one or all plugins to public/plugin_assets | |
|
363 | def self.mirror_assets(name=nil) | |
|
364 | if name.present? | |
|
365 | find(name).mirror_assets | |
|
366 | else | |
|
367 | all.each do |plugin| | |
|
368 | plugin.mirror_assets | |
|
369 | end | |
|
366 | 370 | end |
|
367 | 371 | end |
|
368 | 372 |
@@ -74,7 +74,13 namespace :redmine do | |||
|
74 | 74 | |
|
75 | 75 | desc 'Copies plugins assets into the public directory.' |
|
76 | 76 | task :assets => :environment do |
|
77 | Redmine::Plugin.mirror_assets | |
|
77 | name = ENV['name'] | |
|
78 | ||
|
79 | begin | |
|
80 | Redmine::Plugin.mirror_assets(name) | |
|
81 | rescue Redmine::PluginNotFound | |
|
82 | abort "Plugin #{name} was not found." | |
|
83 | end | |
|
78 | 84 | end |
|
79 | 85 | end |
|
80 | 86 | end |
General Comments 0
You need to be logged in to leave comments.
Login now