simplificator-flogger 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/flogger/assertions.rb +2 -2
- metadata +1 -1
data/lib/flogger/assertions.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Flogger
|
2
2
|
module InstanceMethods
|
3
|
-
ERROR_MESSAGE_PREFIX = 'Error when flogging your files:'
|
3
|
+
ERROR_MESSAGE_PREFIX = 'Error when flogging your files. %i methods exceeded threshold:'
|
4
4
|
ERROR_MESSAGE = "%s has a flog score of %.2f (exceeding treshold of %.2f by %.2f)"
|
5
5
|
|
6
6
|
#
|
@@ -54,7 +54,7 @@ module Flogger
|
|
54
54
|
#
|
55
55
|
def build_flog_message(failures, options)
|
56
56
|
max = failures.inject(0) {|memo, item| memo = [memo, item.first.length].max}
|
57
|
-
message = [ERROR_MESSAGE_PREFIX]
|
57
|
+
message = [ERROR_MESSAGE_PREFIX % failures.size]
|
58
58
|
failures.each do |item|
|
59
59
|
limit = treshold_for_key(item.first, options)
|
60
60
|
message << ERROR_MESSAGE % [item.first.ljust(max + 2, ' '), item.last, limit, (item.last - limit)]
|