@@ -1,15 +1,15 | |||||
1 | # Loads the core plugins located in lib/plugins |
|
1 | # Loads the core plugins located in lib/plugins | |
2 | Dir.glob(File.join(Rails.root, "lib/plugins/*")).sort.each do |directory| |
|
2 | Dir.glob(File.join(Rails.root, "lib/plugins/*")).sort.each do |directory| | |
3 | if File.directory?(directory) |
|
3 | if File.directory?(directory) | |
4 | lib = File.join(directory, "lib") |
|
4 | lib = File.join(directory, "lib") | |
5 | if File.directory?(lib) |
|
5 | if File.directory?(lib) | |
6 | $:.unshift lib |
|
6 | $:.unshift lib | |
7 | ActiveSupport::Dependencies.autoload_paths += [lib] |
|
7 | ActiveSupport::Dependencies.autoload_paths += [lib] | |
8 | end |
|
8 | end | |
9 | initializer = File.join(directory, "init.rb") |
|
9 | initializer = File.join(directory, "init.rb") | |
10 | if File.file?(initializer) |
|
10 | if File.file?(initializer) | |
11 |
|
|
11 | config = RedmineApp::Application.config | |
12 | eval(File.read(initializer), binding, initializer) |
|
12 | eval(File.read(initializer), binding, initializer) | |
13 | end |
|
13 | end | |
14 | end |
|
14 | end | |
15 | end |
|
15 | end |
General Comments 0
You need to be logged in to leave comments.
Login now