diff --git a/lib/kgrader/backend/svn.rb b/lib/kgrader/backend/svn.rb index 59664a0..1661ae9 100644 --- a/lib/kgrader/backend/svn.rb +++ b/lib/kgrader/backend/svn.rb @@ -23,7 +23,9 @@ module KGrader::Backend print "svn: password: " @password = STDIN.noecho(&:gets).chomp puts - puts "svn: bad password or other network issues" unless test_okay url + unless test_okay url + raise SVNError, "bad password or other network issues" + end end end diff --git a/lib/kgrader/errors.rb b/lib/kgrader/errors.rb index 568826e..30b9722 100644 --- a/lib/kgrader/errors.rb +++ b/lib/kgrader/errors.rb @@ -25,4 +25,10 @@ module KGrader class SubmissionError < KGraderError end + + class BackendError < KGraderError + end + + class SVNError < BackendError + end end diff --git a/lib/kgrader/filesystem.rb b/lib/kgrader/filesystem.rb index ca277e8..58f7e91 100644 --- a/lib/kgrader/filesystem.rb +++ b/lib/kgrader/filesystem.rb @@ -35,7 +35,9 @@ module KGrader # ------------------------------------------------------------------------- def courses - Dir[File.join spec_dir, '*', ''].map! { |fn| File.basename fn } + Dir[File.join spec_dir, '*', '_config.yml'].map! do |fn| + File.basename File.dirname fn + end end def assignments(courseid)