lib/htmllog.rb in dev_tasks-1.0.37 vs lib/htmllog.rb in dev_tasks-1.0.38
- old
+ new
@@ -1,53 +1,53 @@
-class HtmlLog
- def initialize
- FileUtils.mkdir("#{Environment.dev_root}/log") if !File.exists?("#{Environment.dev_root}/log")
- @file=File.open("#{Environment.dev_root}/log/rake.html",'w')
- @file.write '<html>'
- @file.write '<body>'
- @file.write '<h1>'
- @file.write "rake"
- ARGV.each do|a|
- puts " #{a}"
- end
- @file.write '</h1>'
- @file.write '<h2>directory:' + File.dirname(__FILE__) + '</h2>'
- @file.write '<h2>time:' + Time.now.to_s + '</h2>'
- @current_task=nil
- @task_commands=Hash.new
- end
-
- def finalize
- @file.write('<ul>')
- @task_commands.each{|k,v|
-
- @file.write('<li>')
- @file.write(k)
- @file.write('</li>')
-
- }
- @file.write '</ul>'
- @file.write '</body>'
- @file.write '</html>'
- @file.close
- end
-
- def start_task task
- @current_task=task
- @task_commands[task]=Hash.new
- @task_commands[task][:command_results]=Array.new
- end
-
- def end_task task
-
- @current_task=nil
- #@file
- end
-
- def start_command command
-
- end
-
- def end_command command
- #@task_commands[@current_task][:command_results] << result
- end
+class HtmlLog
+ def initialize
+ FileUtils.mkdir("#{Environment.dev_root}/log") if !File.exists?("#{Environment.dev_root}/log")
+ @file=File.open("#{Environment.dev_root}/log/rake.html",'w')
+ @file.write '<html>'
+ @file.write '<body>'
+ @file.write '<h1>'
+ @file.write "rake"
+ ARGV.each do|a|
+ puts " #{a}"
+ end
+ @file.write '</h1>'
+ @file.write '<h2>directory:' + File.dirname(__FILE__) + '</h2>'
+ @file.write '<h2>time:' + Time.now.to_s + '</h2>'
+ @current_task=nil
+ @task_commands=Hash.new
+ end
+
+ def finalize
+ @file.write('<ul>')
+ @task_commands.each{|k,v|
+
+ @file.write('<li>')
+ @file.write(k)
+ @file.write('</li>')
+
+ }
+ @file.write '</ul>'
+ @file.write '</body>'
+ @file.write '</html>'
+ @file.close
+ end
+
+ def start_task task
+ @current_task=task
+ @task_commands[task]=Hash.new
+ @task_commands[task][:command_results]=Array.new
+ end
+
+ def end_task task
+
+ @current_task=nil
+ #@file
+ end
+
+ def start_command command
+
+ end
+
+ def end_command command
+ #@task_commands[@current_task][:command_results] << result
+ end
end
\ No newline at end of file