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=$") return false if loaded.include?(file_name) paths.each do |path| fn = file_name + ".rake" full_path = File.join(path, fn) if File.exist?(full_path) load full_path loaded << fn return true end end fail LoadError, "Can't find #{file_name}" end