simplecov_covview 0.2.1 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28f6fa6f8b0245da23b7492dc9115148d12d576d022f7b8468e64a689cb48bda
4
- data.tar.gz: 3227b8d839c3f2f2146d4f93a1624193e1004b5a4a1c7c004dc0e48a1bf320d4
3
+ metadata.gz: 25430be8798869e14b43172a5456bf24e2e235c4f26b36d0fcb05b35a4d1acfc
4
+ data.tar.gz: 7524b3412b01a08dfec4f245589e4d51dee7ffc21947cbe68d6c855635017c68
5
5
  SHA512:
6
- metadata.gz: a53bcfe6d9e216dc266189968e823c92f2057cf42cf63913fed9a7f8af528baac3461c81653c00ae8c624cd4266f307af02d0e8cd056b6b060cef4df484b121b
7
- data.tar.gz: 65662a84309ea96dd50d4e2e3e775b377fa76b9e7de957cfb67179583048add12b0e6b53347e98c7cf54d7d412eef19c8af18346df713b5788d2e6b28cecdaa1
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
- Example output:
38
-
39
- ```text
40
-
41
- ----- file => foo.rb -----
42
- 4 lines covered and 1 lines missed.
43
- line# status count code
44
- 1: [ never] [ - ] # foo.rb
45
- 2: [covered] [ 1 ] def foo(n)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SimplecovCovview
4
- VERSION = "0.2.1"
4
+ VERSION = "0.2.2"
5
5
  end
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.1
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-30 00:00:00.000000000 Z
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