simplecov-console 0.7.1 → 0.7.2
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.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/VERSION +1 -1
- data/lib/simplecov-console.rb +6 -3
- data/simplecov-console.gemspec +2 -2
- data/test/test_simplecov-console.rb +6 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2102089eb7f589999a74c0f72b6f9108f1f065f61e63afe53dd58b79ae74ff34
|
4
|
+
data.tar.gz: b54f26ebe5bbcc86835867cd7cd00c0d62877b4441aa3a7a47d5df969a11ffe6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72c7fec2486cc4ec729032363d1c193e6dbb305c6159844d8816e6861c9cacb8fb0ce5994d2def99d596887b65426088f6f000e92e74fbbfce40868e511f1161
|
7
|
+
data.tar.gz: c66e0da4016b7a407b65b4553ed07e0fb06ec4a3ac5731fb3921bb87cc69612195afca285163f47f21de5c96de6371d4bdd32a53c285e52619cac25698ce820f
|
data/README.md
CHANGED
@@ -133,6 +133,10 @@ coverage: 44.00% (28/50 lines)
|
|
133
133
|
|
134
134
|
## History
|
135
135
|
|
136
|
+
### 0.7.2 (2020.03.05)
|
137
|
+
|
138
|
+
- Fix: table output include ([#17](https://github.com/chetan/simplecov-console/issues/17))
|
139
|
+
|
136
140
|
### 0.7.1 (2020.03.05)
|
137
141
|
|
138
142
|
- Fix: block output doesn't work with frozen string literal ([#16](https://github.com/chetan/simplecov-console/issues/16))
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.2
|
data/lib/simplecov-console.rb
CHANGED
@@ -25,16 +25,19 @@ class SimpleCov::Formatter::Console
|
|
25
25
|
# configure output format ('table', 'block')
|
26
26
|
SimpleCov::Formatter::Console.output_style = ENV.fetch('OUTPUT_STYLE', 'table')
|
27
27
|
|
28
|
-
def
|
29
|
-
|
28
|
+
def include_output_style
|
30
29
|
if SimpleCov::Formatter::Console.output_style == 'block' then
|
31
30
|
require 'simplecov-console/output/block'
|
32
31
|
extend BlockOutput
|
33
32
|
else
|
34
33
|
# default to table
|
35
|
-
require '
|
34
|
+
require 'simplecov-console/output/table'
|
36
35
|
extend TableOutput
|
37
36
|
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def format(result)
|
40
|
+
include_output_style
|
38
41
|
|
39
42
|
root = nil
|
40
43
|
if Module.const_defined? :ROOT then
|
data/simplecov-console.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: simplecov-console 0.7.
|
5
|
+
# stub: simplecov-console 0.7.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "simplecov-console".freeze
|
9
|
-
s.version = "0.7.
|
9
|
+
s.version = "0.7.2"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
@@ -32,21 +32,24 @@ class TestSimplecovConsole < MiniTest::Test
|
|
32
32
|
|
33
33
|
def test_table_output
|
34
34
|
SimpleCov::Formatter::Console.output_style = 'table'
|
35
|
+
@console.include_output_style
|
35
36
|
files = [
|
36
37
|
SourceFile.new('foo.rb',5,[2,3],[Line.new(1), Line.new(4), Line.new(5)],40.0)
|
37
38
|
]
|
38
|
-
actual = @console.
|
39
|
+
actual = @console.output(files,'/')
|
39
40
|
assert actual.is_a? Terminal::Table
|
40
|
-
assert_equal 1, actual.rows.count
|
41
|
+
assert_equal 1, actual.rows.count
|
41
42
|
end
|
42
43
|
|
43
44
|
def test_block_output
|
44
45
|
SimpleCov::Formatter::Console.use_colors = false
|
45
46
|
SimpleCov::Formatter::Console.output_style = 'block'
|
47
|
+
@console.include_output_style
|
48
|
+
|
46
49
|
files = [
|
47
50
|
SourceFile.new('foo.rb',5,[2,3],[Line.new(1), Line.new(4), Line.new(5)],40.0)
|
48
51
|
]
|
49
52
|
expected = "\n file: foo.rb\ncoverage: 40.00% (2/5 lines)\n missed: 1, 4-5\n\n"
|
50
|
-
assert_equal expected, @console.
|
53
|
+
assert_equal expected, @console.output(files,'/')
|
51
54
|
end
|
52
55
|
end
|