lib/environment.rb in dev_tasks-0.0.87 vs lib/environment.rb in dev_tasks-0.0.88
- old
+ new
@@ -71,18 +71,23 @@
def self.rake(directory)
Environment.rake(directory,'default')
end
def self.rake(directory,task)
+ Environment.rake(directory,task,false)
+ end
+
+ def self.rake(directory,task,log)
Dir.chdir(directory) do
timer=Timer.new
out=`rake #{task}`
if $? != 0
- puts "rake #{task} in " + directory
- puts out
+ puts "rake #{task} in " + directory if log
+ puts out if log
raise "rake #{task} in " + directory + " failed"
else
+ puts " " + timer.elapsed_str + " " + dir + " rake " + task if log
#puts "rake default (" + directory + ") " + timer.elapsed_str
end
end
end
end
\ No newline at end of file