simplecov_covview 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +35 -17
- data/img/color-256.png +0 -0
- data/img/color-8.png +0 -0
- data/img/color-no.png +0 -0
- data/lib/simplecov_covview/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25430be8798869e14b43172a5456bf24e2e235c4f26b36d0fcb05b35a4d1acfc
|
4
|
+
data.tar.gz: 7524b3412b01a08dfec4f245589e4d51dee7ffc21947cbe68d6c855635017c68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7f384063406012ce05859933720d4cdbd010fb39bd5a51e74fb56202ab41b1637e1f0acd944340cc50e189fd5c19a759e3ffe83e9ac95124a4a4c656bdeda76
|
7
|
+
data.tar.gz: 79ae4d427bddf2ffb5ff365f7c09ab60da952a2d9d7d4352ddbdc102b379df181c032c3c85e5dadbcb8c5a56bf1f9f647ab5675a1816969eb7bd7f9672969843
|
data/README.md
CHANGED
@@ -26,6 +26,9 @@ Or install it yourself as:
|
|
26
26
|
## Usage
|
27
27
|
|
28
28
|
```ruby
|
29
|
+
require "simplecov"
|
30
|
+
require "simplecov_covview"
|
31
|
+
|
29
32
|
SimpleCov.formatter = SimpleCov::Formatter::CovView
|
30
33
|
# or
|
31
34
|
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
|
@@ -34,24 +37,39 @@ SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
|
|
34
37
|
])
|
35
38
|
```
|
36
39
|
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
3: [covered] [ 10 ] if n <= 10
|
47
|
-
4: [covered] [ 10 ] p "n < 10"
|
48
|
-
5: [ never] [ - ] else
|
49
|
-
6: [ missed] [ 0 ] p "n >= 10"
|
50
|
-
7: [ never] [ - ] end
|
51
|
-
8: [ never] [ - ] end
|
52
|
-
9: [ never] [ - ]
|
53
|
-
10: [covered] [ 11 ] (1..10).each {|x| foo(x)}
|
40
|
+
## Output options:
|
41
|
+
|
42
|
+
### 8-colors colorized output (default)
|
43
|
+
* The default color mode is 8-colors mode.
|
44
|
+
* To enable 8-colors, enable `use_8color` and disable `use_256color`.
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
SimpleCov::Formatter::CovView.use_8color = true
|
48
|
+
SimpleCov::Formatter::CovView.use_256color = false
|
54
49
|
```
|
50
|
+
![8 colors](img/color-8.png "Example output 8-colors")
|
51
|
+
|
52
|
+
|
53
|
+
### 256-colors colorized output
|
54
|
+
* To enable 256-colors mode, enable `use_256color`.
|
55
|
+
* `use_256color` has priority over `use_8color`.
|
56
|
+
```ruby
|
57
|
+
SimpleCov::Formatter::CovView.use_8color = false
|
58
|
+
SimpleCov::Formatter::CovView.use_256color = true
|
59
|
+
# or
|
60
|
+
SimpleCov::Formatter::CovView.use_8color = true
|
61
|
+
SimpleCov::Formatter::CovView.use_256color = true
|
62
|
+
```
|
63
|
+
![256 colors](img/color-256.png "Example output 256-colors")
|
64
|
+
|
65
|
+
### No colorized output
|
66
|
+
Disabling 8-colors and 256-colors will result in no colorization.
|
67
|
+
```ruby
|
68
|
+
SimpleCov::Formatter::CovView.use_8color = false
|
69
|
+
SimpleCov::Formatter::CovView.use_256color = false
|
70
|
+
```
|
71
|
+
|
72
|
+
![no colors](img/color-no.png "Example output no-colors")
|
55
73
|
|
56
74
|
## Contributing
|
57
75
|
|
data/img/color-256.png
ADDED
Binary file
|
data/img/color-8.png
ADDED
Binary file
|
data/img/color-no.png
ADDED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simplecov_covview
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- icm7216
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-08-
|
11
|
+
date: 2021-08-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: test-unit
|
@@ -66,6 +66,9 @@ files:
|
|
66
66
|
- Rakefile
|
67
67
|
- bin/console
|
68
68
|
- bin/setup
|
69
|
+
- img/color-256.png
|
70
|
+
- img/color-8.png
|
71
|
+
- img/color-no.png
|
69
72
|
- lib/simplecov_covview.rb
|
70
73
|
- lib/simplecov_covview/color.rb
|
71
74
|
- lib/simplecov_covview/formatter.rb
|