minitest-ruby_golf_metrics 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,17 +21,21 @@ module Minitest
21
21
  def report
22
22
  io.puts "\nRuby Golf Metrics"
23
23
  @ergs.each do |method_name, ergs|
24
- if ergs.all?
25
- begin
26
- counter = CharacterCounter.new(method_name)
27
- msg = " #{colorize(method_name, 32)}: #{counter.cumulative_size} characters"
28
- msg << " (#{counter.called_method_sizes.join(", ")})" if !counter.self_contained?
29
- io.puts msg
30
- rescue NoMethodError
31
- io.puts " #{colorize(method_name, 31)}: UNDEFINED"
24
+ begin
25
+ if ergs.all?
26
+ begin
27
+ counter = CharacterCounter.new(method_name)
28
+ msg = " #{colorize(method_name, 32)}: #{counter.cumulative_size} character(s)"
29
+ msg << " (#{counter.called_method_sizes.join(", ")})" if !counter.self_contained?
30
+ io.puts msg
31
+ rescue NoMethodError
32
+ io.puts " #{colorize(method_name, 31)}: UNDEFINED"
33
+ end
34
+ else
35
+ io.puts " #{colorize(method_name, 31)}: FAILED"
32
36
  end
33
- else
34
- io.puts " #{colorize(method_name, 31)}: FAILED"
37
+ rescue
38
+ io.puts " #{colorize(method_name, 31)}: there was an error counting your characters"
35
39
  end
36
40
  end
37
41
  end
@@ -1,5 +1,5 @@
1
1
  module Minitest
2
2
  module RubyGolfMetrics
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-ruby_golf_metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -110,7 +110,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
110
110
  version: '0'
111
111
  segments:
112
112
  - 0
113
- hash: -3913661380911445686
113
+ hash: -1004332109766461452
114
114
  required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  none: false
116
116
  requirements:
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  segments:
121
121
  - 0
122
- hash: -3913661380911445686
122
+ hash: -1004332109766461452
123
123
  requirements: []
124
124
  rubyforge_project:
125
125
  rubygems_version: 1.8.23