Permalink
Browse files

Support providing a filename containing a coverage threshold

  • Loading branch information...
1 parent d610ea3 commit 6cb95194c828f356c0334aaf4a9ef0bf5a620b13 @DanielHeath DanielHeath committed with xaviershay Sep 14, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 lib/cane/threshold_check.rb
@@ -19,6 +19,14 @@ def violations
thresholds.map do |operator, file, limit|
value = value_from_file(file)
+ if limit.to_f != limit
+ if Cane::File.exists?(limit)
+ limit = value_from_file(limit)
+ else
+ limit = UnavailableValue.new
+ end
+ end
+
unless value.send(operator, limit.to_f)
{
description: 'Quality threshold crossed',

0 comments on commit 6cb9519

Please sign in to comment.