class Rake::Application
def rake_require(file_name, paths=$LOAD_PATH, loaded=$")
Similar to the regular Ruby +require+ command, but will check
def rake_require(file_name, paths=$LOAD_PATH, loaded=$") fn = file_name + ".rake" return false if loaded.include?(fn) paths.each do |path| full_path = File.join(path, fn) if File.exist?(full_path) Rake.load_rakefile(full_path) loaded << fn return true end end fail LoadError, "Can't find #{file_name}" end