##// END OF EJS Templates
Restores plugin assets mirroring on startup, but it can now be disabled in configuration.yml....
Jean-Philippe Lang -
r9379:5985713335eb
parent child
Show More
@@ -148,6 +148,12 default:
148 # * encrypt data using 'rake db:encrypt RAILS_ENV=production'
148 # * encrypt data using 'rake db:encrypt RAILS_ENV=production'
149 database_cipher_key:
149 database_cipher_key:
150
150
151 # Set this to false to disable plugins' assets mirroring on startup.
152 # You can use `rake redmine:plugins:assets` to manually mirror assets
153 # to public/plugin_assets when you install/upgrade a Redmine plugin.
154 #
155 #mirror_plugins_assets_on_startup: false
156
151 # specific configuration options for production environment
157 # specific configuration options for production environment
152 # that overrides the default ones
158 # that overrides the default ones
153 production:
159 production:
@@ -5,3 +5,6 I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
5 require 'redmine'
5 require 'redmine'
6
6
7 Redmine::Plugin.load
7 Redmine::Plugin.load
8 unless Redmine::Configuration['mirror_plugins_assets_on_startup'] == false
9 Redmine::Plugin.mirror_assets
10 end
@@ -359,6 +359,13 module Redmine #:nodoc:
359 end
359 end
360 end
360 end
361
361
362 # Mirrors all plugins' assets to public/plugin_assets
363 def self.mirror_assets
364 all.each do |plugin|
365 plugin.mirror_assets
366 end
367 end
368
362 # The directory containing this plugin's migrations (<tt>plugin/db/migrate</tt>)
369 # The directory containing this plugin's migrations (<tt>plugin/db/migrate</tt>)
363 def migration_directory
370 def migration_directory
364 File.join(Rails.root, 'plugins', id.to_s, 'db', 'migrate')
371 File.join(Rails.root, 'plugins', id.to_s, 'db', 'migrate')
@@ -59,10 +59,7 namespace :redmine do
59
59
60 desc 'Copies plugins assets into the public directory.'
60 desc 'Copies plugins assets into the public directory.'
61 task :assets => :environment do
61 task :assets => :environment do
62 Redmine::Plugin.all.each do |plugin|
62 Redmine::Plugin.mirror_assets
63 puts "Copying #{plugin.name} assets..."
64 plugin.mirror_assets
65 end
66 end
63 end
67 end
64 end
68 end
65 end
General Comments 0
You need to be logged in to leave comments. Login now