Restores plugin assets mirroring on startup, but it can now be disabled in configuration.yml.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9561 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
68f8470d4a
commit
5985713335
@ -148,6 +148,12 @@ default:
|
|||||||
# * encrypt data using 'rake db:encrypt RAILS_ENV=production'
|
# * encrypt data using 'rake db:encrypt RAILS_ENV=production'
|
||||||
database_cipher_key:
|
database_cipher_key:
|
||||||
|
|
||||||
|
# Set this to false to disable plugins' assets mirroring on startup.
|
||||||
|
# You can use `rake redmine:plugins:assets` to manually mirror assets
|
||||||
|
# to public/plugin_assets when you install/upgrade a Redmine plugin.
|
||||||
|
#
|
||||||
|
#mirror_plugins_assets_on_startup: false
|
||||||
|
|
||||||
# specific configuration options for production environment
|
# specific configuration options for production environment
|
||||||
# that overrides the default ones
|
# that overrides the default ones
|
||||||
production:
|
production:
|
||||||
|
@ -5,3 +5,6 @@ I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
|
|||||||
require 'redmine'
|
require 'redmine'
|
||||||
|
|
||||||
Redmine::Plugin.load
|
Redmine::Plugin.load
|
||||||
|
unless Redmine::Configuration['mirror_plugins_assets_on_startup'] == false
|
||||||
|
Redmine::Plugin.mirror_assets
|
||||||
|
end
|
||||||
|
@ -359,6 +359,13 @@ module Redmine #:nodoc:
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Mirrors all plugins' assets to public/plugin_assets
|
||||||
|
def self.mirror_assets
|
||||||
|
all.each do |plugin|
|
||||||
|
plugin.mirror_assets
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# The directory containing this plugin's migrations (<tt>plugin/db/migrate</tt>)
|
# The directory containing this plugin's migrations (<tt>plugin/db/migrate</tt>)
|
||||||
def migration_directory
|
def migration_directory
|
||||||
File.join(Rails.root, 'plugins', id.to_s, 'db', 'migrate')
|
File.join(Rails.root, 'plugins', id.to_s, 'db', 'migrate')
|
||||||
|
@ -59,10 +59,7 @@ namespace :redmine do
|
|||||||
|
|
||||||
desc 'Copies plugins assets into the public directory.'
|
desc 'Copies plugins assets into the public directory.'
|
||||||
task :assets => :environment do
|
task :assets => :environment do
|
||||||
Redmine::Plugin.all.each do |plugin|
|
Redmine::Plugin.mirror_assets
|
||||||
puts "Copying #{plugin.name} assets..."
|
|
||||||
plugin.mirror_assets
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user