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.
Files changed (2) hide show
  1. data/lib/flogger/assertions.rb +2 -2
  2. metadata +1 -1
@@ -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)]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplificator-flogger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simplificator GmbH