coco 0.5.1 → 0.6
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.
- data/NEWS +10 -7
- data/VERSION +1 -1
- data/lib/coco.rb +1 -1
- data/lib/coco/configuration.rb +1 -0
- data/lib/coco/formatter/console_formatter.rb +16 -2
- metadata +2 -2
data/NEWS
CHANGED
@@ -1,7 +1,16 @@
|
|
1
|
+
v0.6 (2011-10-30)
|
2
|
+
|
3
|
+
* Added an option 'single_line_report'
|
4
|
+
|
5
|
+
|
6
|
+
v0.5.1 (2011-08-08)
|
7
|
+
|
8
|
+
* Fix a bug where excluding a whole folder from the report does not worked
|
9
|
+
|
10
|
+
|
1
11
|
v0.5 (2011-03-14)
|
2
12
|
|
3
13
|
* can exclude a whole folder of ruby files from the report
|
4
|
-
|
5
14
|
* works with unit/test framework
|
6
15
|
|
7
16
|
|
@@ -21,20 +30,16 @@ v0.4.1 (2011-02-27)
|
|
21
30
|
v0.4 (2011-02-26)
|
22
31
|
|
23
32
|
* add colors to console output (*nix only)
|
24
|
-
|
25
33
|
* it can exclude unwanted files from the report
|
26
34
|
|
27
35
|
|
28
36
|
v0.3 (2011-02-25)
|
29
37
|
|
30
38
|
* Report sources not covered at all
|
31
|
-
|
32
39
|
* Configurable via a simple yaml file
|
33
40
|
+ threeshold
|
34
41
|
+ source directories
|
35
|
-
|
36
42
|
* UTF-8 compliant
|
37
|
-
|
38
43
|
* Misc
|
39
44
|
+ sort index.html and console output by percentage
|
40
45
|
+ display coco's version in index.html
|
@@ -43,7 +48,5 @@ v0.3 (2011-02-25)
|
|
43
48
|
v0.2 (2011-02-24)
|
44
49
|
|
45
50
|
* Use coco from rspec with a simple require 'coco'
|
46
|
-
|
47
51
|
* Display filenames covered < 90% on console
|
48
|
-
|
49
52
|
* Build simple html report only for files covered < 90%
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.6
|
data/lib/coco.rb
CHANGED
@@ -23,7 +23,7 @@ at_exit do
|
|
23
23
|
sources = Coco::SourceLister.new(config).list
|
24
24
|
uncovered = Coco::UncoveredLister.new(sources, result.all_from_domain).list
|
25
25
|
|
26
|
-
puts Coco::ConsoleFormatter.new(covered, uncovered).format
|
26
|
+
puts Coco::ConsoleFormatter.new(covered, uncovered).format(config[:single_line_report])
|
27
27
|
|
28
28
|
html_files = Coco::HtmlFormatter.new(covered).format
|
29
29
|
Coco::HtmlFilesWriter.new(html_files).write
|
data/lib/coco/configuration.rb
CHANGED
@@ -5,9 +5,15 @@ module Coco
|
|
5
5
|
# I format coverages information for console output
|
6
6
|
class ConsoleFormatter < Formatter
|
7
7
|
|
8
|
+
# @param [Boolean] single_line_report
|
9
|
+
#
|
8
10
|
# return [string] percent covered and associated filenames
|
9
|
-
def format
|
10
|
-
|
11
|
+
def format single_line_report = false
|
12
|
+
if single_line_report
|
13
|
+
single_line_message
|
14
|
+
else
|
15
|
+
@formatted_output.join("\n")
|
16
|
+
end
|
11
17
|
end
|
12
18
|
|
13
19
|
# @param [Hash] covered
|
@@ -41,6 +47,14 @@ module Coco
|
|
41
47
|
@uncovered.each do |filename| @formatted_output << [0, filename] end
|
42
48
|
end
|
43
49
|
|
50
|
+
def single_line_message
|
51
|
+
if @formatted_output.empty?
|
52
|
+
"All files covered"
|
53
|
+
else
|
54
|
+
ColoredString.new("Some files are uncovered").yellow
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
44
58
|
end
|
45
59
|
|
46
60
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coco
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.6'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-10-30 01:00:00.000000000 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
description: ! '"Another code coverage tool for ruby 1.9
|