corundum 0.0.31 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -72,9 +72,10 @@ module Corundum
72
72
  @rejects = []
73
73
  @passed = true
74
74
  @summary = ""
75
+ @summary_counts = true
75
76
  end
76
77
  attr_reader :name, :rejects
77
- attr_accessor :summary, :passed
78
+ attr_accessor :summary, :passed, :summary_counts
78
79
 
79
80
  def <<(reject)
80
81
  @rejects << reject
@@ -100,7 +101,8 @@ module Corundum
100
101
 
101
102
  def to_s(widths=nil)
102
103
  (passed ? "Ok" : "FAIL") +
103
- ": #{name} (#{length})\n" +
104
+ ": #{name} " +
105
+ (summary_counts ? "(#{length})" : "") + "\n" +
104
106
  (summary.empty? ? "" : (summary + "\n")) +
105
107
  rejects.map do |reject|
106
108
  " " + reject.to_s(widths) + "\n"
@@ -42,7 +42,7 @@ module Corundum
42
42
  file.each_line.with_index do |line, line_number|
43
43
  next unless line_regexp =~ line
44
44
  line.scan(word_regexp) do |word|
45
- rejections << QA::Rejection.new(word, file, line_number+1)
45
+ rejections << QA::Rejection.new(word, filename, line_number+1)
46
46
  end
47
47
  end
48
48
  end
@@ -95,6 +95,7 @@ module Corundum
95
95
  percentage = doc.xpath(coverage_total_xpath).first.content.to_f
96
96
 
97
97
  report = QA::Report.new("Coverage")
98
+ report.summary_counts = false
98
99
  report.add("percentage", entry_path, nil, percentage)
99
100
  report.add("threshold", entry_path, nil, threshold)
100
101
  qa_rejections << report
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: corundum
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.31
5
+ version: 0.1.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Judson Lester
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-08-22 00:00:00.000000000 Z
12
+ date: 2013-10-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  prerelease: false
@@ -415,7 +415,7 @@ licenses:
415
415
  post_install_message:
416
416
  rdoc_options:
417
417
  - --title
418
- - corundum-0.0.31 RDoc
418
+ - corundum-0.1.0 RDoc
419
419
  require_paths:
420
420
  - lib/
421
421
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -424,7 +424,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
424
424
  - !ruby/object:Gem::Version
425
425
  segments:
426
426
  - 0
427
- hash: -138913361
427
+ hash: -367106271
428
428
  version: '0'
429
429
  none: false
430
430
  required_rubygems_version: !ruby/object:Gem::Requirement