simple_cov-formatter-terminal 1.2.0 → 1.4.0
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/.ruby-version +1 -1
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +17 -17
- data/lib/simple_cov/formatter/terminal/file_determiner.rb +8 -4
- data/lib/simple_cov/formatter/terminal/result_printer.rb +12 -1
- data/lib/simple_cov/formatter/terminal/version.rb +1 -1
- data/lib/simple_cov/formatter/terminal.rb +4 -0
- data/simple_cov-formatter-terminal.gemspec +2 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43650ef3dfe9732f2c765db02861799b26a5778d33deb6deba359d623fccb52a
|
4
|
+
data.tar.gz: 05665a80df8b74e04e958ab657a5659c5b00f1cbf35f9dd86a69040f95c5f5dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f4c5f53d8c84c0d5ce852c6a695eaa3b6f707b2774ae3c0436f568dfec5f7f57968b50f41eda02c49a6d77680e1b551ebb5aadeabafcbb7c210d10603149318
|
7
|
+
data.tar.gz: a034211474448b76dc6ec8be2e4756f3d2b425e4acc40fc799e37c44b1906de3973ca000428c10560743a7204d111f240d80f2878c3e06b32bc9ba4c28fabda6
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.3.
|
1
|
+
3.3.4
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## v1.4.0 (2024-07-21)
|
2
|
+
- Handle map-spec-file-to-app failure more elegantly (#229)
|
3
|
+
|
4
|
+
## v1.3.0 (2024-06-28)
|
5
|
+
- Enforce only major and minor parts of required Ruby version (loosening the required Ruby version from 3.3.3 to 3.3.0)
|
6
|
+
|
1
7
|
## v1.2.0 (2024-06-15)
|
2
8
|
- Rename primary branch from `master` to `main`
|
3
9
|
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
simple_cov-formatter-terminal (1.
|
4
|
+
simple_cov-formatter-terminal (1.4.0)
|
5
5
|
activesupport (>= 7.0.4, < 8)
|
6
6
|
memo_wise (>= 1.7.0, < 2)
|
7
7
|
rouge (>= 4.0.0, < 5)
|
@@ -38,11 +38,11 @@ GEM
|
|
38
38
|
json (2.7.2)
|
39
39
|
language_server-protocol (3.17.0.3)
|
40
40
|
memo_wise (1.9.0)
|
41
|
-
method_source (1.
|
42
|
-
minitest (5.
|
41
|
+
method_source (1.1.0)
|
42
|
+
minitest (5.24.1)
|
43
43
|
mutex_m (0.2.0)
|
44
44
|
parallel (1.25.1)
|
45
|
-
parser (3.3.
|
45
|
+
parser (3.3.4.0)
|
46
46
|
ast (~> 2.4.1)
|
47
47
|
racc
|
48
48
|
prism (0.30.0)
|
@@ -56,49 +56,49 @@ GEM
|
|
56
56
|
rainbow (3.1.1)
|
57
57
|
rake (13.2.1)
|
58
58
|
regexp_parser (2.9.2)
|
59
|
-
rexml (3.3.
|
59
|
+
rexml (3.3.2)
|
60
60
|
strscan
|
61
|
-
rouge (4.
|
61
|
+
rouge (4.3.0)
|
62
62
|
rspec (3.13.0)
|
63
63
|
rspec-core (~> 3.13.0)
|
64
64
|
rspec-expectations (~> 3.13.0)
|
65
65
|
rspec-mocks (~> 3.13.0)
|
66
66
|
rspec-core (3.13.0)
|
67
67
|
rspec-support (~> 3.13.0)
|
68
|
-
rspec-expectations (3.13.
|
68
|
+
rspec-expectations (3.13.1)
|
69
69
|
diff-lcs (>= 1.2.0, < 2.0)
|
70
70
|
rspec-support (~> 3.13.0)
|
71
|
-
rspec-mocks (3.13.
|
71
|
+
rspec-mocks (3.13.1)
|
72
72
|
diff-lcs (>= 1.2.0, < 2.0)
|
73
73
|
rspec-support (~> 3.13.0)
|
74
|
-
rspec-support (3.13.
|
75
|
-
rubocop (1.
|
74
|
+
rspec-support (3.13.1)
|
75
|
+
rubocop (1.65.0)
|
76
76
|
json (~> 2.3)
|
77
77
|
language_server-protocol (>= 3.17.0)
|
78
78
|
parallel (~> 1.10)
|
79
79
|
parser (>= 3.3.0.2)
|
80
80
|
rainbow (>= 2.2.2, < 4.0)
|
81
|
-
regexp_parser (>=
|
81
|
+
regexp_parser (>= 2.4, < 3.0)
|
82
82
|
rexml (>= 3.2.5, < 4.0)
|
83
83
|
rubocop-ast (>= 1.31.1, < 2.0)
|
84
84
|
ruby-progressbar (~> 1.7)
|
85
85
|
unicode-display_width (>= 2.4.0, < 3.0)
|
86
86
|
rubocop-ast (1.31.3)
|
87
87
|
parser (>= 3.3.1.0)
|
88
|
-
rubocop-performance (1.21.
|
88
|
+
rubocop-performance (1.21.1)
|
89
89
|
rubocop (>= 1.48.1, < 2.0)
|
90
90
|
rubocop-ast (>= 1.31.1, < 2.0)
|
91
|
-
rubocop-rspec (3.0.
|
91
|
+
rubocop-rspec (3.0.3)
|
92
92
|
rubocop (~> 1.61)
|
93
93
|
ruby-progressbar (1.13.0)
|
94
|
-
runger_config (5.
|
94
|
+
runger_config (5.2.0)
|
95
95
|
activesupport (>= 7.1.2)
|
96
|
-
runger_release_assistant (0.
|
96
|
+
runger_release_assistant (0.10.0)
|
97
97
|
activesupport (>= 6, < 8)
|
98
98
|
memo_wise (>= 1.7, < 2)
|
99
99
|
rainbow (>= 3.0, < 4)
|
100
100
|
slop (~> 4.8)
|
101
|
-
runger_style (2.
|
101
|
+
runger_style (2.12.0)
|
102
102
|
prism (>= 0.24.0)
|
103
103
|
rubocop (>= 1.38.0, < 2)
|
104
104
|
simplecov (0.22.0)
|
@@ -136,7 +136,7 @@ DEPENDENCIES
|
|
136
136
|
simplecov-cobertura
|
137
137
|
|
138
138
|
RUBY VERSION
|
139
|
-
ruby 3.3.
|
139
|
+
ruby 3.3.4p94
|
140
140
|
|
141
141
|
BUNDLED WITH
|
142
142
|
2.5.11
|
@@ -25,14 +25,18 @@ class SimpleCov::Formatter::Terminal::FileDeterminer
|
|
25
25
|
return env_variable_file
|
26
26
|
end
|
27
27
|
|
28
|
-
return nil if
|
28
|
+
return nil if unmappable_spec_file?
|
29
29
|
|
30
30
|
spec_to_app_file_map.lazy.filter_map do |spec_file_regex, app_file_substitution|
|
31
31
|
if executed_spec_file.match?(spec_file_regex)
|
32
32
|
executed_spec_file.sub(spec_file_regex, app_file_substitution)
|
33
33
|
end
|
34
|
-
end.first&.sub(/_spec\.rb\z/, '.rb')
|
35
|
-
|
34
|
+
end.first&.sub(/_spec\.rb\z/, '.rb')
|
35
|
+
end
|
36
|
+
|
37
|
+
memo_wise \
|
38
|
+
def unmappable_spec_file?
|
39
|
+
unmappable_spec_regexes.any? { executed_spec_file.match?(_1) }
|
36
40
|
end
|
37
41
|
|
38
42
|
memo_wise \
|
@@ -43,7 +47,7 @@ class SimpleCov::Formatter::Terminal::FileDeterminer
|
|
43
47
|
memo_wise \
|
44
48
|
def spec_to_app_file_map
|
45
49
|
SimpleCov::Formatter::Terminal.config.spec_to_app_file_map ||
|
46
|
-
|
50
|
+
SimpleCov::Formatter::Terminal::SpecToAppMapping.default_spec_to_app_map
|
47
51
|
end
|
48
52
|
|
49
53
|
memo_wise \
|
@@ -108,7 +108,7 @@ class SimpleCov::Formatter::Terminal::ResultPrinter
|
|
108
108
|
puts('Not showing test coverage details because no specs were executed successfully.')
|
109
109
|
end
|
110
110
|
|
111
|
-
def
|
111
|
+
def print_info_for_undeterminable_application_target
|
112
112
|
puts(<<~LOG.squish)
|
113
113
|
Not showing test coverage details because "#{executed_spec_file}" cannot
|
114
114
|
be mapped to a single application file.
|
@@ -118,6 +118,17 @@ class SimpleCov::Formatter::Terminal::ResultPrinter
|
|
118
118
|
LOG
|
119
119
|
end
|
120
120
|
|
121
|
+
def print_info_for_undetermined_application_target
|
122
|
+
puts(<<~LOG.squish)
|
123
|
+
Not showing test coverage details because we could not map "#{executed_spec_file}"
|
124
|
+
to an application file.
|
125
|
+
LOG
|
126
|
+
puts(<<~LOG.squish)
|
127
|
+
Tip: You can provide a mapping via
|
128
|
+
`SimpleCov::Formatter::Terminal.config.spec_to_app_file_map`.
|
129
|
+
LOG
|
130
|
+
end
|
131
|
+
|
121
132
|
def print_info_for_nonexistent_application_target
|
122
133
|
puts(<<~LOG.squish)
|
123
134
|
Cannot show code coverage. Looked for application file "#{targeted_application_file}",
|
@@ -25,12 +25,14 @@ class SimpleCov::Formatter::Terminal
|
|
25
25
|
:executed_spec_file,
|
26
26
|
:executed_spec_files,
|
27
27
|
:targeted_application_file,
|
28
|
+
:unmappable_spec_file?,
|
28
29
|
)
|
29
30
|
def_delegators(
|
30
31
|
:result_printer,
|
31
32
|
:print_coverage_info,
|
32
33
|
:print_info_for_no_executed_specs,
|
33
34
|
:print_info_for_nonexistent_application_target,
|
35
|
+
:print_info_for_undeterminable_application_target,
|
34
36
|
:print_info_for_undetermined_application_target,
|
35
37
|
)
|
36
38
|
|
@@ -46,6 +48,8 @@ class SimpleCov::Formatter::Terminal
|
|
46
48
|
def format(result)
|
47
49
|
if executed_spec_files.nil?
|
48
50
|
print_info_for_no_executed_specs
|
51
|
+
elsif unmappable_spec_file?
|
52
|
+
print_info_for_undeterminable_application_target
|
49
53
|
elsif targeted_application_file.nil?
|
50
54
|
print_info_for_undetermined_application_target
|
51
55
|
elsif File.exist?(targeted_application_file)
|
@@ -12,7 +12,8 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = 'Print detailed code coverage info to the terminal'
|
13
13
|
spec.homepage = 'https://github.com/davidrunger/simple_cov-formatter-terminal'
|
14
14
|
spec.license = 'MIT'
|
15
|
-
|
15
|
+
required_ruby_version = File.read('.ruby-version').rstrip.sub(/\A(\d+\.\d+)\.\d+\z/, '\1.0')
|
16
|
+
spec.required_ruby_version = ">= #{required_ruby_version}"
|
16
17
|
|
17
18
|
spec.metadata['homepage_uri'] = spec.homepage
|
18
19
|
spec.metadata['source_code_uri'] = 'https://github.com/davidrunger/simple_cov-formatter-terminal'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_cov-formatter-terminal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Runger
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -170,14 +170,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
170
170
|
requirements:
|
171
171
|
- - ">="
|
172
172
|
- !ruby/object:Gem::Version
|
173
|
-
version: 3.3.
|
173
|
+
version: 3.3.0
|
174
174
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
175
|
requirements:
|
176
176
|
- - ">="
|
177
177
|
- !ruby/object:Gem::Version
|
178
178
|
version: '0'
|
179
179
|
requirements: []
|
180
|
-
rubygems_version: 3.5.
|
180
|
+
rubygems_version: 3.5.15
|
181
181
|
signing_key:
|
182
182
|
specification_version: 4
|
183
183
|
summary: Print detailed code coverage info to the terminal
|