lib/hoc.rb in hoc-0.1 vs lib/hoc.rb in hoc-0.2

- old
+ new

@@ -38,9 +38,13 @@ @format = format end # Generate report. def report - Git.new(@dir).hits.map { |h| h.total }.inject(:+) + if File.exist?(File.join(@dir, '.git')) + Git.new(@dir).hits.map { |h| h.total }.inject(:+) + else + fail 'only Git repositories supported now' + end end end end