From 18110c4d4c83ae98512588d394dbd70e7b742c0c Mon Sep 17 00:00:00 2001 From: Ben Kurtovic Date: Fri, 22 Apr 2016 00:04:20 -0500 Subject: [PATCH] Fix a couple bugs. --- lib/kgrader/backend/svn.rb | 3 +-- lib/kgrader/runtime.rb | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/kgrader/backend/svn.rb b/lib/kgrader/backend/svn.rb index 2701eb8..bbd4495 100644 --- a/lib/kgrader/backend/svn.rb +++ b/lib/kgrader/backend/svn.rb @@ -51,8 +51,7 @@ module KGrader::Backend end def commit(repo, message, paths = nil) - # TODO - # run 'commit', '-m', message, *paths.map { |fn| File.join repo, fn } + run 'commit', '-m', message, *paths.map { |fn| File.join repo, fn } end def commit_date(repo) diff --git a/lib/kgrader/runtime.rb b/lib/kgrader/runtime.rb index ca99a65..fe0e9eb 100644 --- a/lib/kgrader/runtime.rb +++ b/lib/kgrader/runtime.rb @@ -1,3 +1,4 @@ +require 'fileutils' require 'timeout' module KGrader @@ -5,7 +6,7 @@ module KGrader MAX_COLS = 79 def testcase(options) - puts " running test: #{$0} ".center MAX_COLS, '=' + puts " running test: #{File.basename $0} ".center MAX_COLS, '=' begin Timeout::timeout options[:alarm] { yield } rescue Timeout::Error