summaryrefslogtreecommitdiffstats
path: root/config/initializers/00-core_plugins.rb
blob: 004c2a1f6e347b5a41c855730018c95a4994d9d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 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)
      config = config = RedmineApp::Application.config
      eval(File.read(initializer), binding, initializer)
    end
  end
end