kjeldahl-metric_fu 1.1.5 → 1.1.5.1

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/generators/rcov.rb +4 -7
  2. metadata +1 -1
@@ -41,7 +41,7 @@ module MetricFu
41
41
  rcov_opts = MetricFu.rcov[:rcov_opts].join(' ')
42
42
  output = "#{MetricFu::Rcov.metric_directory}/rcov.txt"
43
43
  @@success = Kernel.system("rcov #{test_files} #{rcov_opts} >> #{output}")
44
- print_head(output)
44
+ print_head
45
45
  @@success
46
46
  rescue LoadError
47
47
  if RUBY_PLATFORM =~ /java/
@@ -92,12 +92,9 @@ module MetricFu
92
92
 
93
93
  private
94
94
  # Copy rcov build log to stdout
95
- def print_head(output)
96
- File.open(output, 'r') do |f|
97
- while ((line = f.gets) && !(line =~ /^=*$/)) do #Stop printing when reaching the '========' marker
98
- puts line
99
- end
100
- end
95
+ def print_head
96
+ output = File.open(MetricFu::Rcov.metric_directory + '/rcov.txt').read
97
+ puts output.split(NEW_FILE_MARKER).first
101
98
  end
102
99
  end
103
100
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kjeldahl-metric_fu
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Scruggs