module Thor::Util
def self.load_thorfile(path, content=nil)
inside the sandbox to avoid namespacing conflicts.
Receives a path and load the thor file in the path. The file is evaluated
def self.load_thorfile(path, content=nil) content ||= File.binread(path) begin Thor::Sandbox.class_eval(content, path) rescue Exception => e $stderr.puts "WARNING: unable to load thorfile #{path.inspect}: #{e.message}" end end