Runs history

This commit is contained in:
Gregory Eremin
2013-06-07 00:04:41 +04:00
parent 441acca610
commit b97f0c1a12
7 changed files with 40 additions and 3 deletions
@@ -0,0 +1,7 @@
module BurdenWeb
class RunsController < ApplicationController
def index
@runs = Burden::Storage.run.where(name: params[:task_id]).order('created_at desc').limit(100)
end
end
end
@@ -16,7 +16,11 @@ module BurdenWeb
def run
Rails.application.load_tasks
Rake::Task[params[:id]].invoke
task = Rake::Task[params[:id]]
task.prerequisite_tasks.each{ |t| t.execute(nil) }
task.execute(nil)
rescue => e # Gotta catch 'em all!
ensure
redirect_to params[:back]
end