2012-04-26 21:23:24 +04:00
|
|
|
# Loads the core plugins located in lib/plugins
|
|
|
|
Dir.glob(File.join(Rails.root, "lib/plugins/*")).sort.each do |directory|
|
|
|
|
if File.directory?(directory)
|
|
|
|
lib = File.join(directory, "lib")
|
|
|
|
if File.directory?(lib)
|
|
|
|
$:.unshift lib
|
|
|
|
ActiveSupport::Dependencies.autoload_paths += [lib]
|
|
|
|
end
|
|
|
|
initializer = File.join(directory, "init.rb")
|
|
|
|
if File.file?(initializer)
|
2013-04-12 05:18:28 +04:00
|
|
|
config = RedmineApp::Application.config
|
2012-04-26 21:23:24 +04:00
|
|
|
eval(File.read(initializer), binding, initializer)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|