class Origen::Application::RakeLoader
A simple class to load all rake tasks available to an application, a class is used here to avoid collision with the Rake namespace method
Public Instance Methods
load_tasks()
click to toggle source
# File lib/origen/application.rb, line 108 def load_tasks $VERBOSE = nil # Don't care about world writable dir warnings and the like require 'colored' # Load all Origen tasks first Dir.glob("#{Origen.top}/lib/tasks/*.rake").sort.each do |file| load file end # Now the application's own tasks if Origen.app.origen_core? Dir.glob("#{Origen.root}/lib/tasks/private/*.rake").sort.each do |file| load file end else # New application dir structure support Dir.glob("#{Origen.root}/app/lib/tasks/*.rake").sort.each do |file| load file end Dir.glob("#{Origen.root}/lib/tasks/*.rake").sort.each do |file| load file end end # Finally those that the plugin's have given us ([Origen.app] + Origen.app.plugins).each do |plugin| namespace plugin.name do # New application dir structure support Dir.glob("#{plugin.root}/app/lib/tasks/shared/*.rake").sort.each do |file| load file end Dir.glob("#{plugin.root}/lib/tasks/shared/*.rake").sort.each do |file| load file end end end end