minitest-ruby_golf_metrics 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,8 +8,8 @@ module Minitest
8
8
  class CharacterCounter
9
9
 
10
10
  def initialize(method_name, previous_method_stack = [])
11
- method_stack = previous_method_stack + [method_name]
12
- @method_name = method_name
11
+ @method_name = method_name.to_sym
12
+ method_stack = previous_method_stack + [@method_name]
13
13
  source = RubyGolf.method(method_name).to_raw_source(strip_enclosure: true)
14
14
  @size = source.strip.gsub(/\s+/, "").size
15
15
  parser = MethodParser.new(source)
@@ -13,7 +13,8 @@ module Minitest
13
13
  def record(erg)
14
14
  method_name = erg.location.
15
15
  gsub("RubyGolfTest#test_", "").
16
- gsub(/_[0-9]+.*$/, "")
16
+ gsub(/ .*$/, "").
17
+ gsub(/_[0-9]+/, "")
17
18
  @ergs[method_name] ||= []
18
19
  @ergs[method_name] << erg.passed?
19
20
  end
@@ -1,5 +1,5 @@
1
1
  module Minitest
2
2
  module RubyGolfMetrics
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
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.6
4
+ version: 0.0.7
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: -1004332109766461452
113
+ hash: -4075154969680677506
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: -1004332109766461452
122
+ hash: -4075154969680677506
123
123
  requirements: []
124
124
  rubyforge_project:
125
125
  rubygems_version: 1.8.23