simplecov 1.0.2 → 1.1.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/README.md +65 -1425
- data/lib/simplecov/atomic_file.rb +70 -0
- data/lib/simplecov/cli/clean.rb +43 -3
- data/lib/simplecov/cli/command_helpers.rb +55 -0
- data/lib/simplecov/cli/coverage.rb +21 -28
- data/lib/simplecov/cli/coverage_file.rb +65 -0
- data/lib/simplecov/cli/diff.rb +43 -48
- data/lib/simplecov/cli/dotfile.rb +12 -6
- data/lib/simplecov/cli/merge.rb +12 -10
- data/lib/simplecov/cli/open.rb +3 -5
- data/lib/simplecov/cli/report.rb +31 -23
- data/lib/simplecov/cli/serve/report_preparer.rb +29 -0
- data/lib/simplecov/cli/serve/static_file_handler.rb +122 -0
- data/lib/simplecov/cli/serve.rb +30 -94
- data/lib/simplecov/cli/uncovered.rb +20 -25
- data/lib/simplecov/cli.rb +15 -2
- data/lib/simplecov/combine/branches_combiner.rb +43 -19
- data/lib/simplecov/combine/coverage_accumulator.rb +268 -0
- data/lib/simplecov/combine/identity_interner.rb +30 -0
- data/lib/simplecov/combine/interned_counts.rb +30 -0
- data/lib/simplecov/combine/lines_combiner.rb +48 -20
- data/lib/simplecov/combine/methods_combiner.rb +46 -21
- data/lib/simplecov/combine/results_combiner.rb +12 -37
- data/lib/simplecov/combine.rb +5 -23
- data/lib/simplecov/command_guesser.rb +66 -9
- data/lib/simplecov/configuration/coverage.rb +12 -15
- data/lib/simplecov/configuration/coverage_criteria.rb +34 -38
- data/lib/simplecov/configuration/eval_coverage.rb +41 -0
- data/lib/simplecov/configuration/filters.rb +11 -44
- data/lib/simplecov/configuration/formatting.rb +18 -9
- data/lib/simplecov/configuration/groups.rb +42 -0
- data/lib/simplecov/configuration/merging.rb +8 -7
- data/lib/simplecov/configuration/thresholds.rb +14 -13
- data/lib/simplecov/configuration.rb +13 -43
- data/lib/simplecov/coverage_json.rb +24 -0
- data/lib/simplecov/coverage_statistics.rb +1 -1
- data/lib/simplecov/coverage_violations.rb +15 -5
- data/lib/simplecov/defaults.rb +7 -3
- data/lib/simplecov/directive.rb +1 -1
- data/lib/simplecov/exit_codes/check.rb +33 -0
- data/lib/simplecov/exit_codes/maximum_coverage_drop_check.rb +11 -20
- data/lib/simplecov/exit_codes/maximum_overall_coverage_check.rb +3 -16
- data/lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb +14 -23
- data/lib/simplecov/exit_codes/minimum_coverage_by_group_check.rb +14 -25
- data/lib/simplecov/exit_codes/minimum_overall_coverage_check.rb +4 -17
- data/lib/simplecov/exit_codes.rb +1 -0
- data/lib/simplecov/exit_handling.rb +11 -41
- data/lib/simplecov/file_list.rb +5 -10
- data/lib/simplecov/filter.rb +43 -9
- data/lib/simplecov/formatter/base.rb +11 -0
- data/lib/simplecov/formatter/coverage_json_writer.rb +97 -0
- data/lib/simplecov/formatter/html_formatter/public/index.html +35 -5
- data/lib/simplecov/formatter/html_formatter/viewer_data_validator.rb +96 -0
- data/lib/simplecov/formatter/html_formatter.rb +67 -47
- data/lib/simplecov/formatter/json_formatter/errors_formatter.rb +54 -56
- data/lib/simplecov/formatter/json_formatter/result_hash_formatter.rb +78 -88
- data/lib/simplecov/formatter/json_formatter/source_file_formatter.rb +70 -76
- data/lib/simplecov/formatter/json_formatter.rb +5 -48
- data/lib/simplecov/formatter/multi_formatter.rb +1 -1
- data/lib/simplecov/formatter/simple_formatter.rb +8 -5
- data/lib/simplecov/formatter.rb +12 -0
- data/lib/simplecov/group_names.rb +32 -0
- data/lib/simplecov/last_run.rb +16 -9
- data/lib/simplecov/lines_classifier.rb +29 -8
- data/lib/simplecov/load_global_config.rb +5 -2
- data/lib/simplecov/parallel_adapters/base.rb +17 -0
- data/lib/simplecov/parallel_adapters/generic.rb +2 -2
- data/lib/simplecov/parallel_adapters/parallel_tests.rb +2 -2
- data/lib/simplecov/parallel_coordination.rb +6 -1
- data/lib/simplecov/parallel_result_merger.rb +230 -0
- data/lib/simplecov/report_deferral.rb +49 -0
- data/lib/simplecov/report_stamp.rb +28 -0
- data/lib/simplecov/result.rb +40 -10
- data/lib/simplecov/result_adapter.rb +48 -16
- data/lib/simplecov/result_merger/resultset_file.rb +43 -7
- data/lib/simplecov/result_merger/resultset_run_identity.rb +67 -0
- data/lib/simplecov/result_merger/resultset_store.rb +15 -12
- data/lib/simplecov/result_merger/unloaded_files.rb +103 -0
- data/lib/simplecov/result_merger.rb +69 -42
- data/lib/simplecov/result_processing.rb +82 -43
- data/lib/simplecov/run_identity.rb +77 -0
- data/lib/simplecov/simulate_coverage.rb +35 -11
- data/lib/simplecov/source_file/method.rb +7 -1
- data/lib/simplecov/source_file/ruby_data_parser.rb +25 -3
- data/lib/simplecov/source_file/skip_chunks.rb +7 -10
- data/lib/simplecov/source_file/source_loader.rb +23 -7
- data/lib/simplecov/source_file/statistics.rb +24 -16
- data/lib/simplecov/static_coverage_extractor/condition_folding.rb +203 -13
- data/lib/simplecov/static_coverage_extractor/location_conventions.rb +19 -30
- data/lib/simplecov/static_coverage_extractor/method_collector.rb +7 -0
- data/lib/simplecov/static_coverage_extractor/prism_compat.rb +55 -0
- data/lib/simplecov/static_coverage_extractor/value_position.rb +6 -14
- data/lib/simplecov/static_coverage_extractor/visitor.rb +23 -36
- data/lib/simplecov/unloaded_file_injector.rb +75 -0
- data/lib/simplecov/version.rb +1 -1
- data/lib/simplecov.rb +11 -5
- data/schemas/coverage-v1.0.schema.json +2 -2
- data/schemas/coverage.schema.json +2 -2
- data/sig/simplecov.rbs +206 -67
- metadata +28 -14
- data/doc/alternate-formatters.md +0 -66
- data/doc/commercial-services.md +0 -25
- data/doc/editor-integration.md +0 -18
- data/lib/simplecov/combine/files_combiner.rb +0 -70
- data/lib/simplecov/formatter/html_formatter/public/application.css +0 -1
- data/lib/simplecov/formatter/html_formatter/public/application.js +0 -18
- data/lib/simplecov/formatter/html_formatter/public/favicon_green.png +0 -0
- data/lib/simplecov/formatter/html_formatter/public/favicon_red.png +0 -0
- data/lib/simplecov/formatter/html_formatter/public/favicon_yellow.png +0 -0
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: simplecov
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Erik Berlin
|
|
@@ -32,17 +32,17 @@ extra_rdoc_files: []
|
|
|
32
32
|
files:
|
|
33
33
|
- LICENSE
|
|
34
34
|
- README.md
|
|
35
|
-
- doc/alternate-formatters.md
|
|
36
|
-
- doc/commercial-services.md
|
|
37
|
-
- doc/editor-integration.md
|
|
38
35
|
- exe/simplecov
|
|
39
36
|
- lib/minitest/simplecov_plugin.rb
|
|
40
37
|
- lib/simplecov-html.rb
|
|
41
38
|
- lib/simplecov.rb
|
|
39
|
+
- lib/simplecov/atomic_file.rb
|
|
42
40
|
- lib/simplecov/autostart.rb
|
|
43
41
|
- lib/simplecov/cli.rb
|
|
44
42
|
- lib/simplecov/cli/clean.rb
|
|
43
|
+
- lib/simplecov/cli/command_helpers.rb
|
|
45
44
|
- lib/simplecov/cli/coverage.rb
|
|
45
|
+
- lib/simplecov/cli/coverage_file.rb
|
|
46
46
|
- lib/simplecov/cli/diff.rb
|
|
47
47
|
- lib/simplecov/cli/dotfile.rb
|
|
48
48
|
- lib/simplecov/cli/merge.rb
|
|
@@ -50,11 +50,15 @@ files:
|
|
|
50
50
|
- lib/simplecov/cli/report.rb
|
|
51
51
|
- lib/simplecov/cli/run.rb
|
|
52
52
|
- lib/simplecov/cli/serve.rb
|
|
53
|
+
- lib/simplecov/cli/serve/report_preparer.rb
|
|
54
|
+
- lib/simplecov/cli/serve/static_file_handler.rb
|
|
53
55
|
- lib/simplecov/cli/uncovered.rb
|
|
54
56
|
- lib/simplecov/color.rb
|
|
55
57
|
- lib/simplecov/combine.rb
|
|
56
58
|
- lib/simplecov/combine/branches_combiner.rb
|
|
57
|
-
- lib/simplecov/combine/
|
|
59
|
+
- lib/simplecov/combine/coverage_accumulator.rb
|
|
60
|
+
- lib/simplecov/combine/identity_interner.rb
|
|
61
|
+
- lib/simplecov/combine/interned_counts.rb
|
|
58
62
|
- lib/simplecov/combine/lines_combiner.rb
|
|
59
63
|
- lib/simplecov/combine/methods_combiner.rb
|
|
60
64
|
- lib/simplecov/combine/results_combiner.rb
|
|
@@ -62,17 +66,21 @@ files:
|
|
|
62
66
|
- lib/simplecov/configuration.rb
|
|
63
67
|
- lib/simplecov/configuration/coverage.rb
|
|
64
68
|
- lib/simplecov/configuration/coverage_criteria.rb
|
|
69
|
+
- lib/simplecov/configuration/eval_coverage.rb
|
|
65
70
|
- lib/simplecov/configuration/filters.rb
|
|
66
71
|
- lib/simplecov/configuration/formatting.rb
|
|
72
|
+
- lib/simplecov/configuration/groups.rb
|
|
67
73
|
- lib/simplecov/configuration/ignored_entries.rb
|
|
68
74
|
- lib/simplecov/configuration/merging.rb
|
|
69
75
|
- lib/simplecov/configuration/thresholds.rb
|
|
76
|
+
- lib/simplecov/coverage_json.rb
|
|
70
77
|
- lib/simplecov/coverage_statistics.rb
|
|
71
78
|
- lib/simplecov/coverage_violations.rb
|
|
72
79
|
- lib/simplecov/defaults.rb
|
|
73
80
|
- lib/simplecov/deprecation.rb
|
|
74
81
|
- lib/simplecov/directive.rb
|
|
75
82
|
- lib/simplecov/exit_codes.rb
|
|
83
|
+
- lib/simplecov/exit_codes/check.rb
|
|
76
84
|
- lib/simplecov/exit_codes/exit_code_handling.rb
|
|
77
85
|
- lib/simplecov/exit_codes/maximum_coverage_drop_check.rb
|
|
78
86
|
- lib/simplecov/exit_codes/maximum_overall_coverage_check.rb
|
|
@@ -84,19 +92,17 @@ files:
|
|
|
84
92
|
- lib/simplecov/filter.rb
|
|
85
93
|
- lib/simplecov/formatter.rb
|
|
86
94
|
- lib/simplecov/formatter/base.rb
|
|
95
|
+
- lib/simplecov/formatter/coverage_json_writer.rb
|
|
87
96
|
- lib/simplecov/formatter/html_formatter.rb
|
|
88
|
-
- lib/simplecov/formatter/html_formatter/public/application.css
|
|
89
|
-
- lib/simplecov/formatter/html_formatter/public/application.js
|
|
90
|
-
- lib/simplecov/formatter/html_formatter/public/favicon_green.png
|
|
91
|
-
- lib/simplecov/formatter/html_formatter/public/favicon_red.png
|
|
92
|
-
- lib/simplecov/formatter/html_formatter/public/favicon_yellow.png
|
|
93
97
|
- lib/simplecov/formatter/html_formatter/public/index.html
|
|
98
|
+
- lib/simplecov/formatter/html_formatter/viewer_data_validator.rb
|
|
94
99
|
- lib/simplecov/formatter/json_formatter.rb
|
|
95
100
|
- lib/simplecov/formatter/json_formatter/errors_formatter.rb
|
|
96
101
|
- lib/simplecov/formatter/json_formatter/result_hash_formatter.rb
|
|
97
102
|
- lib/simplecov/formatter/json_formatter/source_file_formatter.rb
|
|
98
103
|
- lib/simplecov/formatter/multi_formatter.rb
|
|
99
104
|
- lib/simplecov/formatter/simple_formatter.rb
|
|
105
|
+
- lib/simplecov/group_names.rb
|
|
100
106
|
- lib/simplecov/last_run.rb
|
|
101
107
|
- lib/simplecov/lines_classifier.rb
|
|
102
108
|
- lib/simplecov/load_global_config.rb
|
|
@@ -106,6 +112,7 @@ files:
|
|
|
106
112
|
- lib/simplecov/parallel_adapters/generic.rb
|
|
107
113
|
- lib/simplecov/parallel_adapters/parallel_tests.rb
|
|
108
114
|
- lib/simplecov/parallel_coordination.rb
|
|
115
|
+
- lib/simplecov/parallel_result_merger.rb
|
|
109
116
|
- lib/simplecov/process.rb
|
|
110
117
|
- lib/simplecov/profiles.rb
|
|
111
118
|
- lib/simplecov/profiles/bundler_filter.rb
|
|
@@ -114,6 +121,8 @@ files:
|
|
|
114
121
|
- lib/simplecov/profiles/root_filter.rb
|
|
115
122
|
- lib/simplecov/profiles/strict.rb
|
|
116
123
|
- lib/simplecov/profiles/test_frameworks.rb
|
|
124
|
+
- lib/simplecov/report_deferral.rb
|
|
125
|
+
- lib/simplecov/report_stamp.rb
|
|
117
126
|
- lib/simplecov/result.rb
|
|
118
127
|
- lib/simplecov/result/missing_source_files_reporter.rb
|
|
119
128
|
- lib/simplecov/result/source_file_builder.rb
|
|
@@ -121,8 +130,11 @@ files:
|
|
|
121
130
|
- lib/simplecov/result_merger.rb
|
|
122
131
|
- lib/simplecov/result_merger/legacy_format_adapter.rb
|
|
123
132
|
- lib/simplecov/result_merger/resultset_file.rb
|
|
133
|
+
- lib/simplecov/result_merger/resultset_run_identity.rb
|
|
124
134
|
- lib/simplecov/result_merger/resultset_store.rb
|
|
135
|
+
- lib/simplecov/result_merger/unloaded_files.rb
|
|
125
136
|
- lib/simplecov/result_processing.rb
|
|
137
|
+
- lib/simplecov/run_identity.rb
|
|
126
138
|
- lib/simplecov/simulate_coverage.rb
|
|
127
139
|
- lib/simplecov/source_file.rb
|
|
128
140
|
- lib/simplecov/source_file/branch.rb
|
|
@@ -140,8 +152,10 @@ files:
|
|
|
140
152
|
- lib/simplecov/static_coverage_extractor/condition_folding.rb
|
|
141
153
|
- lib/simplecov/static_coverage_extractor/location_conventions.rb
|
|
142
154
|
- lib/simplecov/static_coverage_extractor/method_collector.rb
|
|
155
|
+
- lib/simplecov/static_coverage_extractor/prism_compat.rb
|
|
143
156
|
- lib/simplecov/static_coverage_extractor/value_position.rb
|
|
144
157
|
- lib/simplecov/static_coverage_extractor/visitor.rb
|
|
158
|
+
- lib/simplecov/unloaded_file_injector.rb
|
|
145
159
|
- lib/simplecov/useless_results_remover.rb
|
|
146
160
|
- lib/simplecov/version.rb
|
|
147
161
|
- lib/simplecov_json_formatter.rb
|
|
@@ -153,10 +167,10 @@ licenses:
|
|
|
153
167
|
- MIT
|
|
154
168
|
metadata:
|
|
155
169
|
bug_tracker_uri: https://github.com/simplecov-ruby/simplecov/issues
|
|
156
|
-
changelog_uri: https://github.com/simplecov-ruby/simplecov/blob/main/
|
|
157
|
-
documentation_uri: https://www.rubydoc.info/gems/simplecov/1.0
|
|
170
|
+
changelog_uri: https://github.com/simplecov-ruby/simplecov/blob/main/docs/Changelog.md
|
|
171
|
+
documentation_uri: https://www.rubydoc.info/gems/simplecov/1.1.0
|
|
158
172
|
mailing_list_uri: https://groups.google.com/forum/#!forum/simplecov
|
|
159
|
-
source_code_uri: https://github.com/simplecov-ruby/simplecov/tree/v1.0
|
|
173
|
+
source_code_uri: https://github.com/simplecov-ruby/simplecov/tree/v1.1.0
|
|
160
174
|
rubygems_mfa_required: 'true'
|
|
161
175
|
rdoc_options: []
|
|
162
176
|
require_paths:
|
|
@@ -172,7 +186,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
172
186
|
- !ruby/object:Gem::Version
|
|
173
187
|
version: '0'
|
|
174
188
|
requirements: []
|
|
175
|
-
rubygems_version: 4.0.
|
|
189
|
+
rubygems_version: 4.0.18
|
|
176
190
|
specification_version: 4
|
|
177
191
|
summary: Code coverage for Ruby
|
|
178
192
|
test_files: []
|
data/doc/alternate-formatters.md
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
## Alternate coverage report formatters
|
|
2
|
-
|
|
3
|
-
The community around simplecov provides a whole bunch of alternate formatters beyond the official
|
|
4
|
-
[simplecov-html](https://github.com/simplecov-ruby/simplecov-html) gem.
|
|
5
|
-
|
|
6
|
-
If you have built or found one that is missing here, please send a Pull Request for this document!
|
|
7
|
-
|
|
8
|
-
#### [simplecov-badge](https://github.com/matthew342/simplecov-badge)
|
|
9
|
-
*by Matt Hale*
|
|
10
|
-
|
|
11
|
-
A formatter that generates a coverage badge for use in your project's readme using ImageMagick.
|
|
12
|
-
|
|
13
|
-
#### [simplecov-small-badge](https://github.com/marcgrimme/simplecov-small-badge)
|
|
14
|
-
*by Marc Grimme*
|
|
15
|
-
|
|
16
|
-
A formatter that generates a small coverage badge for use in your project's readme using the SVG.
|
|
17
|
-
|
|
18
|
-
#### [simplecov_badger](https://github.com/traels-it/simplecov_badger)
|
|
19
|
-
*by traels.it*
|
|
20
|
-
|
|
21
|
-
A formatter that uploads your coverage to a server, that will then host a SVG badge of the score. No need to have the badge stored in repository.
|
|
22
|
-
|
|
23
|
-
#### [simplecov-cobertura](https://github.com/dashingrocket/simplecov-cobertura)
|
|
24
|
-
*by Jesse Bowes*
|
|
25
|
-
|
|
26
|
-
A formatter that generates Cobertura XML.
|
|
27
|
-
|
|
28
|
-
#### [simplecov-csv](https://github.com/fguillen/simplecov-csv)
|
|
29
|
-
*by Fernando Guillen*
|
|
30
|
-
|
|
31
|
-
CSV formatter for SimpleCov
|
|
32
|
-
|
|
33
|
-
#### [simplecov-erb](https://github.com/kpaulisse/simplecov-erb)
|
|
34
|
-
*by [Kevin Paulisse](https://github.com/kpaulisse)*
|
|
35
|
-
|
|
36
|
-
Flexible formatter that generates the output from an ERB template.
|
|
37
|
-
|
|
38
|
-
#### [simplecov-json](https://github.com/vicentllongo/simplecov-json)
|
|
39
|
-
*by Vicent Llongo*
|
|
40
|
-
|
|
41
|
-
JSON formatter for SimpleCov
|
|
42
|
-
|
|
43
|
-
#### [simplecov-lcov](https://github.com/fortissimo1997/simplecov-lcov)
|
|
44
|
-
*by fortissimo1997*
|
|
45
|
-
|
|
46
|
-
lcov formatter for SimpleCov
|
|
47
|
-
|
|
48
|
-
#### [simplecov-rcov](https://github.com/fguillen/simplecov-rcov)
|
|
49
|
-
*by Fernando Guillen*
|
|
50
|
-
|
|
51
|
-
"The target of this formatter is to cheat on Hudson so I can use the Ruby metrics plugin with SimpleCov."
|
|
52
|
-
|
|
53
|
-
#### [simplecov-single_file_reporter](https://github.com/grosser/simplecov-single_file_reporter)
|
|
54
|
-
*by [Michael Grosser](http://grosser.it)*
|
|
55
|
-
|
|
56
|
-
A formatter that prints the coverage of the file under test when you run a single test file.
|
|
57
|
-
|
|
58
|
-
#### [simplecov-t_wada](https://github.com/ysksn/simplecov-t_wada)
|
|
59
|
-
*by [Yosuke Kabuto](https://github.com/ysksn)*
|
|
60
|
-
|
|
61
|
-
t_wada AA formatter for SimpleCov
|
|
62
|
-
|
|
63
|
-
#### [simplecov-tailwindcss](https://github.com/chiefpansancolt/simplecov-tailwindcss)
|
|
64
|
-
*by [Chiefpansancolt](https://github.com/chiefpansancolt)*
|
|
65
|
-
|
|
66
|
-
A TailwindCSS & TailwindUI Designed HTML formatter with clean and easy search of files with a tabular left Navigation.
|
data/doc/commercial-services.md
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
## Commercial Services with SimpleCov integration
|
|
2
|
-
|
|
3
|
-
There is a bunch of services that offer integration with your existing CI pipeline and SimpleCov coverage
|
|
4
|
-
reports. Please note these are not associated with the SimpleCov project itself, so please report problems with
|
|
5
|
-
these integrations with their respective owners.
|
|
6
|
-
|
|
7
|
-
#### [Codacy](https://github.com/codacy/codacy-coverage-reporter)
|
|
8
|
-
*by [Codacy](https://www.codacy.com/)*
|
|
9
|
-
|
|
10
|
-
Upload coverage reports to [codacy.com](https://www.codacy.com/), a hosted (or self-hosted) software quality analysis platform that also includes coverage reporting.
|
|
11
|
-
|
|
12
|
-
#### [codecov](https://github.com/codecov/codecov-ruby)
|
|
13
|
-
*by [Codecov](https://codecov.io/)*
|
|
14
|
-
|
|
15
|
-
Upload coverage reports to [codecov.io](https://codecov.io/), a hosted coverage reporting solution.
|
|
16
|
-
|
|
17
|
-
#### [coveralls](https://github.com/lemurheavy/coveralls-ruby)
|
|
18
|
-
*by [Coveralls](https://coveralls.io/)*
|
|
19
|
-
|
|
20
|
-
Upload coverage reports to [coveralls.io](https://coveralls.io/), a hosted coverage reporting solution.
|
|
21
|
-
|
|
22
|
-
#### [Qlty Cloud](https://github.com/qltysh/qlty)
|
|
23
|
-
*by [Qlty Software](https://qlty.sh/)*
|
|
24
|
-
|
|
25
|
-
Upload coverage reports to [Qlty Cloud](https://qlty.sh/), a hosted software quality analysis and that also includes coverage reporting.
|
data/doc/editor-integration.md
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
## Editor integration
|
|
2
|
-
|
|
3
|
-
Some editors have a graphical integration for the simplecov gem.
|
|
4
|
-
|
|
5
|
-
#### [Atom Editor: coverage](https://atom.io/packages/coverage)
|
|
6
|
-
*by Philip Giuliani*
|
|
7
|
-
|
|
8
|
-
Adds an overview of your current test coverage to Atom.
|
|
9
|
-
|
|
10
|
-
#### [Sublime Editor: SimpleCov](https://packagecontrol.io/packages/SimpleCov)
|
|
11
|
-
*by sentience*
|
|
12
|
-
|
|
13
|
-
Adds in editor live coverage highlighting, status bar coverage information, and summary coverage information.
|
|
14
|
-
|
|
15
|
-
#### [cadre](https://github.com/nyarly/cadre)
|
|
16
|
-
*by Judson Lester*
|
|
17
|
-
|
|
18
|
-
Includes a formatter for Simplecov that emits a Vim script to mark up code files with coverage information.
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
# frozen_string_literal: true
|
|
2
|
-
|
|
3
|
-
module SimpleCov
|
|
4
|
-
module Combine
|
|
5
|
-
#
|
|
6
|
-
# Handle combining two coverage results for same file
|
|
7
|
-
#
|
|
8
|
-
# Should be called through `SimpleCov.combine`.
|
|
9
|
-
module FilesCombiner
|
|
10
|
-
module_function
|
|
11
|
-
|
|
12
|
-
empty_table = {} #: Hash[untyped, untyped]
|
|
13
|
-
EMPTY_TABLE = empty_table.freeze
|
|
14
|
-
private_constant :EMPTY_TABLE
|
|
15
|
-
|
|
16
|
-
# Branch/method tuples drawn from a simulated (never-loaded) file
|
|
17
|
-
# when the other side of the merge was actually executed.
|
|
18
|
-
NO_SYNTHESIZED = {"branches" => EMPTY_TABLE, "methods" => EMPTY_TABLE}.freeze
|
|
19
|
-
|
|
20
|
-
#
|
|
21
|
-
# Combines the results for 2 coverages of a file.
|
|
22
|
-
#
|
|
23
|
-
# @return [Hash]
|
|
24
|
-
#
|
|
25
|
-
def combine(coverage_a, coverage_b)
|
|
26
|
-
source_a, source_b = reconcile_synthesized(coverage_a, coverage_b)
|
|
27
|
-
|
|
28
|
-
combination = {"lines" => Combine.combine(LinesCombiner, coverage_a["lines"], coverage_b["lines"])}
|
|
29
|
-
if SimpleCov.branch_coverage?
|
|
30
|
-
combined_branches = Combine.combine(BranchesCombiner, source_a["branches"], source_b["branches"])
|
|
31
|
-
combination["branches"] = combined_branches || {}
|
|
32
|
-
end
|
|
33
|
-
if SimpleCov.method_coverage?
|
|
34
|
-
combination["methods"] = Combine.combine(MethodsCombiner, source_a["methods"], source_b["methods"])
|
|
35
|
-
end
|
|
36
|
-
combination
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
# When exactly one side of the merge was actually executed, its branch
|
|
40
|
-
# and method tuples are authoritative and the other side's are dropped.
|
|
41
|
-
# A simulated entry (SimulateCoverage backfills tracked-but-unloaded
|
|
42
|
-
# files) synthesizes those tuples statically, so a location that drifts
|
|
43
|
-
# from what Coverage emits would otherwise be unioned in by position
|
|
44
|
-
# and survive as a phantom, permanently-missed branch (see #1233). This
|
|
45
|
-
# contains any such drift to denominator inflation for files no process
|
|
46
|
-
# loaded, rather than a false miss on a covered file. Lines are never
|
|
47
|
-
# dropped: a simulated file's line shape is correct and carries the
|
|
48
|
-
# unloaded-file denominator (#1059).
|
|
49
|
-
#
|
|
50
|
-
# Returns the two coverages to draw branch/method tuples from, blanking
|
|
51
|
-
# the non-executed side only when the other side was executed. When
|
|
52
|
-
# both sides were executed (two real runs) or neither was (all
|
|
53
|
-
# simulated), both are returned unchanged and combine normally.
|
|
54
|
-
def reconcile_synthesized(coverage_a, coverage_b)
|
|
55
|
-
executed_a = executed?(coverage_a)
|
|
56
|
-
executed_b = executed?(coverage_b)
|
|
57
|
-
return [coverage_a, coverage_b] if executed_a == executed_b
|
|
58
|
-
|
|
59
|
-
executed_a ? [coverage_a, NO_SYNTHESIZED] : [NO_SYNTHESIZED, coverage_b]
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
# A file some process actually loaded has at least one executed line;
|
|
63
|
-
# a simulated (never-loaded) file's lines are all `nil` or `0`.
|
|
64
|
-
def executed?(coverage)
|
|
65
|
-
lines = Array(coverage["lines"]) #: Array[Integer?]
|
|
66
|
-
lines.any? { |count| count&.positive? }
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
end
|
|
70
|
-
end
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*,*:before,*:after{box-sizing:border-box}*{margin:0;padding:0}html{-moz-text-size-adjust:none;-webkit-text-size-adjust:none;text-size-adjust:none}body{min-height:100vh;line-height:1.5;-webkit-font-smoothing:antialiased}img,picture,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit}h1,h2,h3,h4,h5,h6{overflow-wrap:break-word;text-wrap:balance}p{overflow-wrap:break-word;text-wrap:pretty}table{border-collapse:collapse;border-spacing:0}ul,ol{list-style:none}a{text-decoration-skip-ink:auto;color:currentColor}.hide{display:none}.hljs{color:#24292e}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media(prefers-color-scheme:dark){:root:not(.light-mode) .hljs{color:#c9d1d9}:root:not(.light-mode) .hljs-doctag,:root:not(.light-mode) .hljs-keyword,:root:not(.light-mode) .hljs-meta .hljs-keyword,:root:not(.light-mode) .hljs-template-tag,:root:not(.light-mode) .hljs-template-variable,:root:not(.light-mode) .hljs-type,:root:not(.light-mode) .hljs-variable.language_{color:#ff7b72}:root:not(.light-mode) .hljs-title,:root:not(.light-mode) .hljs-title.class_,:root:not(.light-mode) .hljs-title.class_.inherited__,:root:not(.light-mode) .hljs-title.function_{color:#d2a8ff}:root:not(.light-mode) .hljs-attr,:root:not(.light-mode) .hljs-attribute,:root:not(.light-mode) .hljs-literal,:root:not(.light-mode) .hljs-meta,:root:not(.light-mode) .hljs-number,:root:not(.light-mode) .hljs-operator,:root:not(.light-mode) .hljs-variable,:root:not(.light-mode) .hljs-selector-attr,:root:not(.light-mode) .hljs-selector-class,:root:not(.light-mode) .hljs-selector-id{color:#79c0ff}:root:not(.light-mode) .hljs-regexp,:root:not(.light-mode) .hljs-string,:root:not(.light-mode) .hljs-meta .hljs-string{color:#a5d6ff}:root:not(.light-mode) .hljs-built_in,:root:not(.light-mode) .hljs-symbol{color:#ffa657}:root:not(.light-mode) .hljs-comment,:root:not(.light-mode) .hljs-code,:root:not(.light-mode) .hljs-formula{color:#8b949e}:root:not(.light-mode) .hljs-name,:root:not(.light-mode) .hljs-quote,:root:not(.light-mode) .hljs-selector-tag,:root:not(.light-mode) .hljs-selector-pseudo{color:#7ee787}:root:not(.light-mode) .hljs-subst{color:#c9d1d9}:root:not(.light-mode) .hljs-section{color:#1f6feb}}.dark-mode .hljs{color:#c9d1d9}.dark-mode .hljs-doctag,.dark-mode .hljs-keyword,.dark-mode .hljs-meta .hljs-keyword,.dark-mode .hljs-template-tag,.dark-mode .hljs-template-variable,.dark-mode .hljs-type,.dark-mode .hljs-variable.language_{color:#ff7b72}.dark-mode .hljs-title,.dark-mode .hljs-title.class_,.dark-mode .hljs-title.class_.inherited__,.dark-mode .hljs-title.function_{color:#d2a8ff}.dark-mode .hljs-attr,.dark-mode .hljs-attribute,.dark-mode .hljs-literal,.dark-mode .hljs-meta,.dark-mode .hljs-number,.dark-mode .hljs-operator,.dark-mode .hljs-variable,.dark-mode .hljs-selector-attr,.dark-mode .hljs-selector-class,.dark-mode .hljs-selector-id{color:#79c0ff}.dark-mode .hljs-regexp,.dark-mode .hljs-string,.dark-mode .hljs-meta .hljs-string{color:#a5d6ff}.dark-mode .hljs-built_in,.dark-mode .hljs-symbol{color:#ffa657}.dark-mode .hljs-comment,.dark-mode .hljs-code,.dark-mode .hljs-formula{color:#8b949e}.dark-mode .hljs-name,.dark-mode .hljs-quote,.dark-mode .hljs-selector-tag,.dark-mode .hljs-selector-pseudo{color:#7ee787}.dark-mode .hljs-subst{color:#c9d1d9}.dark-mode .hljs-section{color:#1f6feb}:root{--font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;--font-mono: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;--sp-1: 4px;--sp-2: 8px;--sp-3: 12px;--sp-4: 16px;--sp-5: 20px;--sp-6: 24px;--sp-8: 32px;--radius-sm: 8px;--radius-md: 12px;--radius-lg: 16px;--bg: #f0f1f3;--surface: #fff;--surface-alt: #f0f1f3;--text: #111;--text-secondary: #333;--text-tertiary: #444;--zebra: #f4f5f7;--border: #c0c5cc;--border-strong: #999;--accent: #0550ae;--accent-hover: #033d8b;--accent-subtle: #ddf4ff;--green: #116329;--red: #a40e26;--yellow: #7a5200;--orange: #953800;--covered-bg: #ccf5d0;--covered-line-num-bg: #9ae6a4;--missed-bg: #ffd8d5;--missed-line-num-bg: #ffb8b3;--never-bg: #fff;--never-line-num-bg: #f0f1f3;--skipped-bg: #fff0a0;--skipped-line-num-bg: #eed860;--missed-branch-bg: #ffd0a0;--missed-branch-line-num-bg: #ffb060;--missed-branch-text: #b45309;--missed-method-bg: #e8d0ff;--missed-method-line-num-bg: #d4b0ff;--missed-method-text: #7b2d8e;--source-bg: #fff;--source-border: #c0c5cc;--source-line-number: #444;--source-line-num-bg: #f0f1f3;--hits-bg: #e0e3e8;--hits-color: #333;--overlay-bg: rgba(0, 0, 0, .5);--bar-bg: #d0d7de;--bar-height: 6px}@media(prefers-color-scheme:dark){:root:not(.light-mode){--bg: #010409;--surface: #0d1117;--surface-alt: #161b22;--text: #f0f3f6;--text-secondary: #b0b8c4;--text-tertiary: #9aa5b1;--zebra: #161b22;--border: #3d444d;--border-strong: #555e68;--accent: #6cb6ff;--accent-hover: #96ccff;--accent-subtle: #121d2f;--green: #56d364;--red: #ff6b61;--yellow: #e3b341;--orange: #f0883e;--covered-bg: #122d1e;--covered-line-num-bg: #1e4430;--missed-bg: #351418;--missed-line-num-bg: #4e1d20;--never-bg: #0d1117;--never-line-num-bg: #161b22;--skipped-bg: #302818;--skipped-line-num-bg: #443920;--missed-branch-bg: #322218;--missed-branch-line-num-bg: #483020;--missed-branch-text: #ffb86c;--missed-method-bg: #1e1830;--missed-method-line-num-bg: #2a2044;--missed-method-text: #dcb8ff;--source-bg: #0d1117;--source-border: #3d444d;--source-line-number: #9aa5b1;--source-line-num-bg: #161b22;--hits-bg: #262c34;--hits-color: #b0b8c4;--overlay-bg: rgba(1, 4, 9, .8);--bar-bg: #3d444d}}.dark-mode{--bg: #010409;--surface: #0d1117;--surface-alt: #161b22;--text: #f0f3f6;--text-secondary: #b0b8c4;--text-tertiary: #9aa5b1;--zebra: #161b22;--border: #3d444d;--border-strong: #555e68;--accent: #6cb6ff;--accent-hover: #96ccff;--accent-subtle: #121d2f;--green: #56d364;--red: #ff6b61;--yellow: #e3b341;--orange: #f0883e;--covered-bg: #122d1e;--covered-line-num-bg: #1e4430;--missed-bg: #351418;--missed-line-num-bg: #4e1d20;--never-bg: #0d1117;--never-line-num-bg: #161b22;--skipped-bg: #302818;--skipped-line-num-bg: #443920;--missed-branch-bg: #322218;--missed-branch-line-num-bg: #483020;--missed-branch-text: #ffb86c;--missed-method-bg: #1e1830;--missed-method-line-num-bg: #2a2044;--missed-method-text: #dcb8ff;--source-bg: #0d1117;--source-border: #3d444d;--source-line-number: #9aa5b1;--source-line-num-bg: #161b22;--hits-bg: #262c34;--hits-color: #b0b8c4;--overlay-bg: rgba(1, 4, 9, .8);--bar-bg: #3d444d}body{font-family:var(--font-sans);font-size:18px;color:var(--text);background:var(--bg);padding:var(--sp-6)}a{color:var(--accent);text-decoration:none;transition:color .15s}a:hover{color:var(--accent-hover)}strong,b{font-weight:600}#loading{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;background:var(--bg);z-index:9999}#loading-inner{width:280px;text-align:center}#loading-bar-track{width:100%;height:6px;background:var(--bar-bg);border-radius:6px;overflow:hidden}#loading-bar-fill{width:0%;height:100%;background:var(--accent);border-radius:6px;transition:width .15s ease-out}#loading-text{margin-top:var(--sp-3);font-size:18px;color:var(--text-tertiary)}#sort-overlay{position:fixed;inset:0;z-index:9998;display:flex;align-items:center;justify-content:center;background:var(--overlay-bg)}#sort-overlay-label{padding:var(--sp-2) var(--sp-4);border:1px solid var(--border);border-radius:6px;background:var(--bg);font-size:16px;color:var(--text-tertiary)}#wrapper{margin:0 auto}.tab-bar{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--sp-4);margin-bottom:-1px;position:relative;z-index:1}abbr.timeago{text-decoration:none;border:none}.group_tabs{display:flex;align-self:flex-end;gap:var(--sp-1);overflow-x:auto}.group_tabs li a{display:block;padding:var(--sp-2) var(--sp-4);font-size:18px;font-weight:500;color:var(--text-secondary);background:transparent;border:1px solid transparent;border-bottom:none;border-radius:var(--radius-md) var(--radius-md) 0 0;white-space:nowrap;transition:color .15s,background .15s}.group_tabs li a:hover{color:var(--text);background:var(--surface-alt);text-decoration:none}.group_tabs li.active a{color:var(--accent);background:var(--surface);border-color:var(--border);font-weight:600}#content{background:var(--surface);border:1px solid var(--border);border-radius:0 var(--radius-lg) var(--radius-lg) var(--radius-lg);padding:var(--sp-6)}.file_list_container h2{font-size:24px;font-weight:600;color:var(--text);margin:0}.file_list_container h2 .covered_percent{font-weight:600}.summary-stats{display:flex;flex-direction:column;gap:var(--sp-1);font-size:18px;color:var(--text-secondary)}.summary-stats b{color:var(--text)}.summary-stats .missed-branch-text b,.summary-stats .missed-method-text-color b,.summary-stats .green b,.summary-stats .red b{color:inherit}.summary-stats .green{color:var(--green)}.summary-stats .red{color:var(--red)}.coverage-disabled{color:var(--text-tertiary);font-style:italic}.th-with-filter{display:flex;align-items:center;gap:var(--sp-2)}table.file_list th.cell--coverage .th-with-filter{white-space:nowrap;justify-content:flex-end}.th-with-filter .th-label{white-space:nowrap}.col-filter--name{width:100%;min-width:200px;border:1px solid var(--border);border-radius:999px;padding:var(--sp-1) var(--sp-4);font-size:14px;background:var(--surface);color:var(--text);outline:none}.col-filter--name:focus{border-color:var(--accent)}.col-filter__coverage{display:flex;gap:var(--sp-1)}.col-filter__op{border:1px solid var(--border);border-radius:var(--radius-sm);padding:var(--sp-1) var(--sp-1);font-size:14px;background:var(--surface);color:var(--text);cursor:pointer}.col-filter__value{border:1px solid var(--border);border-radius:var(--radius-sm);padding:var(--sp-1) var(--sp-2);font-size:14px;background:var(--surface);color:var(--text);width:60px;outline:none}.col-filter__value:focus{border-color:var(--accent)}.file_list--responsive{overflow-x:auto}table.file_list{width:100%;font-size:18px}table.file_list{border-collapse:separate;border-spacing:0}table.file_list thead th{font-size:14px;font-weight:600;text-transform:uppercase;letter-spacing:.04em;color:var(--text-tertiary);background:var(--surface);padding:var(--sp-2) var(--sp-2);border-bottom:2px solid var(--border-strong);white-space:nowrap}table.file_list tbody tr{background:var(--surface);cursor:pointer}table.file_list tbody tr:nth-child(2n){background:var(--zebra)}table.file_list tbody tr:hover{background:var(--accent-subtle)}table.file_list tbody tr.keyboard-focus{background:var(--accent-subtle);outline:2px solid var(--accent);outline-offset:-2px}table.file_list tbody td{padding:var(--sp-2) var(--sp-2);border-bottom:1px solid var(--border);color:var(--text)}table.file_list td.cell--number{text-align:right;font-variant-numeric:tabular-nums;color:var(--text)}table.file_list th.cell--left,table.file_list th.cell--coverage{text-align:left}table.file_list th.cell--number{text-align:right}table.file_list th.cell--numerator{text-align:right;padding-right:0}table.file_list th.cell--denominator{text-align:left;padding-left:0}table.file_list td.strong{font-weight:600;color:var(--text)}table.file_list td.t-file__name{white-space:nowrap}a.src_link{color:var(--accent);font-weight:500;word-break:break-all}table.file_list td.cell--coverage{white-space:nowrap}.coverage-cell{display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-end;gap:10px}.coverage-cell .coverage-pct{flex:0 0 4.5em;font-variant-numeric:tabular-nums}tr.t-window-hidden{display:none}tr.t-show-all td{padding:var(--sp-3);text-align:center;color:var(--text-tertiary);cursor:pointer}.coverage-cell .bar-sizer{flex:0 0 auto;width:var(--bar-sizer-width, 240px);min-width:160px;max-width:240px}table.file_list td.cell--numerator{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap;padding-left:var(--sp-1);padding-right:0}table.file_list td.cell--denominator{text-align:left;font-variant-numeric:tabular-nums;white-space:nowrap;padding-left:0;padding-right:var(--sp-1)}table.file_list .totals-row td.cell--numerator{color:var(--text);padding-right:0}table.file_list .totals-row td.cell--denominator{color:var(--text);padding-left:0}.coverage-cell__fraction{font-variant-numeric:tabular-nums;color:var(--text-secondary);font-size:14px;white-space:nowrap}.coverage-bar{width:100%;height:var(--bar-height);background:var(--bar-bg);border-radius:6px;overflow:hidden}.coverage-bar__fill{height:100%;border-radius:6px}.coverage-bar__fill--green{background:var(--green)}.coverage-bar__fill--yellow{background:var(--yellow)}.coverage-bar__fill--red{background:var(--red)}.green,table.file_list td.green{color:var(--green)}.red,table.file_list td.red{color:var(--red)}.yellow,table.file_list td.yellow{color:var(--yellow)}.missed-branch-text{color:var(--missed-branch-text)}.missed-method-text-color{color:var(--missed-method-text)}dialog.source-dialog{position:fixed;inset:0;width:100%;height:100%;max-width:100%;max-height:100%;border:none;padding:0;background:var(--bg);color:var(--text);overflow:hidden}dialog.source-dialog::backdrop{background:var(--overlay-bg)}dialog.source-dialog[open]{display:flex;flex-direction:column}.source-dialog__header{display:flex;align-items:flex-start;justify-content:space-between;padding:var(--sp-4) var(--sp-6);background:var(--surface);border-bottom:1px solid var(--border);flex-shrink:0}.source-dialog__title{flex:1;min-width:0}.source-dialog__title h2{font-size:22px;font-weight:700;color:var(--text);margin-bottom:var(--sp-2);word-break:break-all}.source-legend{display:flex;flex-wrap:wrap;gap:var(--sp-2) var(--sp-4);align-items:center;align-self:flex-end;flex-shrink:0;margin-left:auto;padding-left:var(--sp-6)}.source-legend__item{display:flex;align-items:center;gap:var(--sp-1);font-size:13px;color:var(--text-secondary);white-space:nowrap}.source-legend__swatch{display:inline-block;width:14px;height:14px;border-radius:3px;border:1px solid var(--border)}.source-legend__swatch--covered{background:var(--covered-bg);border-color:var(--covered-line-num-bg)}.source-legend__swatch--missed{background:var(--missed-bg);border-color:var(--missed-line-num-bg)}.source-legend__swatch--skipped{background:var(--skipped-bg);border-color:var(--skipped-line-num-bg)}.source-legend__swatch--missed-branch{background:var(--missed-branch-bg);border-color:var(--missed-branch-line-num-bg)}.source-legend__swatch--missed-method{background:var(--missed-method-bg);border-color:var(--missed-method-line-num-bg)}.source-dialog__close{appearance:none;background:none;border:1px solid var(--border);border-radius:50%;width:34px;height:34px;font-size:0;color:var(--text-secondary);cursor:pointer;position:relative;flex-shrink:0;margin-left:var(--sp-4);transition:color .15s,border-color .15s}.source-dialog__close:before,.source-dialog__close:after{content:"";position:absolute;top:50%;left:50%;width:14px;height:2px;background:currentColor;border-radius:1px}.source-dialog__close:before{transform:translate(-50%,-50%) rotate(45deg)}.source-dialog__close:after{transform:translate(-50%,-50%) rotate(-45deg)}.source-dialog__close:hover{color:var(--text);border-color:var(--border-strong)}.source-dialog__body{flex:1;overflow:auto}.source_table .header{padding:var(--sp-4) var(--sp-6);background:var(--surface)}.source_table .header h2{font-size:22px;font-weight:700;color:var(--text);margin-bottom:var(--sp-2)}table.file_list .totals-row td{padding:var(--sp-2) var(--sp-2);font-weight:600;border-bottom:2px solid var(--border-strong);background:var(--surface-alt)}.totals-row .t-file-count{font-size:18px;font-weight:700;color:var(--text)}.t-missed-method-toggle{color:var(--missed-method-text);font-weight:600;cursor:pointer;text-decoration:none}.t-missed-method-toggle:hover{text-decoration:underline;color:var(--missed-method-text)}.t-missed-method-list ul{padding-left:2em;margin-top:var(--sp-1);max-height:200px;overflow-y:auto}.t-missed-method-list li{list-style:none}.source_table pre{margin:0;padding:0;white-space:normal;color:var(--text);font-family:var(--font-mono);font-size:16px;line-height:24px;background:var(--source-bg);border:1px solid var(--source-border);border-top:none}.source_table code{color:inherit;font-family:var(--font-mono)}.source_table pre ol{margin:0;padding:0;list-style:none;counter-reset:linenumber}.source_table pre li{display:flex;counter-increment:linenumber;background:var(--never-bg)}.source_table pre li:before{content:counter(linenumber);flex-shrink:0;width:50px;padding:0 8px;text-align:right;color:var(--source-line-number);background:var(--source-line-num-bg);border-right:1px solid var(--source-border);-webkit-user-select:none;user-select:none;cursor:pointer}.source_table pre li:hover:before{color:var(--text)}.source_table pre li:hover{cursor:pointer}.source_table pre li code{order:1;flex:1;min-width:0;padding:0 12px;white-space:pre-wrap}.source_table pre .hits{order:2;flex-shrink:0;padding:0 var(--sp-2);background:var(--hits-bg);color:var(--hits-color);font-family:var(--font-mono);font-size:14px;text-align:center;line-height:24px;border-left:1px solid var(--source-border);-webkit-user-select:none;user-select:none}.source_table pre .hits:after{content:attr(data-content)}.source_table .covered{background-color:var(--covered-bg)}.source_table .missed{background-color:var(--missed-bg)}.source_table .never{background-color:var(--never-bg)}.source_table .skipped{background-color:var(--skipped-bg)}.source_table .missed-branch{background-color:var(--missed-branch-bg)}.source_table .missed-method{background-color:var(--missed-method-bg)}.source_table .covered:before{background-color:var(--covered-line-num-bg)}.source_table .missed:before{background-color:var(--missed-line-num-bg)}.source_table .never:before{background-color:var(--never-line-num-bg)}.source_table .skipped:before{background-color:var(--skipped-line-num-bg)}.source_table .missed-branch:before{background-color:var(--missed-branch-line-num-bg)}.source_table .missed-method:before{background-color:var(--missed-method-line-num-bg)}#dark-mode-toggle{appearance:none;background:var(--surface);color:var(--text-secondary);border:1px solid var(--border);border-radius:999px;padding:var(--sp-1) var(--sp-4);font-size:16px;font-family:var(--font-sans);cursor:pointer;white-space:nowrap;transition:color .15s,border-color .15s}#dark-mode-toggle:hover{color:var(--text);border-color:var(--border-strong)}#footer{color:var(--text-tertiary);font-size:16px;margin-top:var(--sp-5);text-align:center}#footer a{color:var(--text-secondary);text-decoration:underline}#footer a:hover{color:var(--text)}table.file_list thead th.sorting,table.file_list thead th.sorting_asc,table.file_list thead th.sorting_desc{cursor:pointer;position:relative;padding-right:12px}table.file_list thead th.sorting:after,table.file_list thead th.sorting_asc:after,table.file_list thead th.sorting_desc:after{position:absolute;right:2px;top:50%;transform:translateY(-50%);font-size:14px;color:var(--text-tertiary)}table.file_list thead th.sorting:after{content:"\2195"}table.file_list thead th.sorting_asc:after{content:"\2191"}table.file_list thead th.sorting_desc:after{content:"\2193"}@media print{:root,.dark-mode{--bg: #fff;--surface: #fff;--surface-alt: #f4f5f7;--text: #111;--text-secondary: #333;--text-tertiary: #444;--zebra: #f4f5f7;--border: #c0c5cc;--border-strong: #999;--accent: #0550ae;--green: #116329;--red: #a40e26;--yellow: #7a5200;--orange: #953800;--bar-bg: #d0d7de;--covered-bg: #ccf5d0;--covered-line-num-bg: #9ae6a4;--missed-bg: #ffd8d5;--missed-line-num-bg: #ffb8b3;--never-bg: #fff;--never-line-num-bg: #f0f1f3;--skipped-bg: #fff0a0;--skipped-line-num-bg: #eed860;--missed-branch-bg: #ffd0a0;--missed-branch-line-num-bg: #ffb060;--missed-branch-text: #b45309;--missed-method-bg: #e8d0ff;--missed-method-line-num-bg: #d4b0ff;--missed-method-text: #7b2d8e;--source-bg: #fff;--source-border: #c0c5cc;--source-line-number: #444;--source-line-num-bg: #f0f1f3;--hits-bg: #e0e3e8;--hits-color: #333}body{padding:0;font-size:12pt}#loading,#sort-overlay,#dark-mode-toggle,.tab-bar,.source_files,.col-filter--name,.col-filter__coverage,tr.t-show-all,table.file_list thead th.sorting:after,table.file_list thead th.sorting_asc:after,table.file_list thead th.sorting_desc:after{display:none!important}#wrapper,.file_list_container{display:block!important}body:has(.source-dialog[open]) #wrapper{display:none!important}#content{border:none;border-radius:0;padding:0}.file_list_container .group_name{display:inline!important;font-size:16pt;font-weight:700}.file_list_container .covered_percent{display:inline!important;font-weight:600}.file_list_container+.file_list_container{margin-top:24pt}dialog.source-dialog{display:none}dialog.source-dialog[open]{display:block!important;position:static;width:100%;height:auto;max-height:none;overflow:visible;background:#fff}.source-dialog__close{display:none!important}.source-dialog__header{flex-wrap:wrap;border-bottom:none;padding:0 0 8pt}.source-dialog__title{flex:0 0 100%}.source-dialog__title h2{word-break:normal;overflow-wrap:break-word}.source-legend{margin-left:0;padding-left:0;padding-top:var(--sp-2)}.source-dialog__body{overflow:visible}.source_table pre{font-size:8pt;line-height:1.4}.source_table pre li{-webkit-print-color-adjust:exact;print-color-adjust:exact}.source_table pre li:before{-webkit-print-color-adjust:exact;print-color-adjust:exact}.source_table pre .hits{-webkit-print-color-adjust:exact;print-color-adjust:exact}.coverage-bar{border:1px solid var(--border);-webkit-print-color-adjust:exact;print-color-adjust:exact}.coverage-bar__fill{-webkit-print-color-adjust:exact;print-color-adjust:exact}table.file_list tbody tr:nth-child(2n){-webkit-print-color-adjust:exact;print-color-adjust:exact}table.file_list{font-size:10pt}table.file_list thead th{font-size:9pt}table.file_list{page-break-inside:auto}table.file_list tr{page-break-inside:avoid}table.file_list thead{display:table-header-group}#footer{font-size:10pt;margin-top:12pt}#footer a:after{content:" (" attr(href) ")";font-size:9pt;color:var(--text-tertiary)}}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";(()=>{var xn=Object.create;var dt=Object.defineProperty;var An=Object.getOwnPropertyDescriptor;var Cn=Object.getOwnPropertyNames;var Rn=Object.getPrototypeOf,Nn=Object.prototype.hasOwnProperty;var On=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var In=(e,t,n,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of Cn(t))!Nn.call(e,r)&&r!==n&&dt(e,r,{get:()=>t[r],enumerable:!(s=An(t,r))||s.enumerable});return e};var Hn=(e,t,n)=>(n=e!=null?xn(Rn(e)):{},In(t||!e||!e.__esModule?dt(n,"default",{value:e,enumerable:!0}):n,e));var J=(e,t,n)=>new Promise((s,r)=>{var l=c=>{try{o(n.next(c))}catch(d){r(d)}},i=c=>{try{o(n.throw(c))}catch(d){r(d)}},o=c=>c.done?s(c.value):Promise.resolve(c.value).then(l,i);o((n=n.apply(e,t)).next())});var Bt=On((br,Dt)=>{function Tt(e){return e instanceof Map?e.clear=e.delete=e.set=function(){throw new Error("map is read-only")}:e instanceof Set&&(e.add=e.clear=e.delete=function(){throw new Error("set is read-only")}),Object.freeze(e),Object.getOwnPropertyNames(e).forEach(t=>{let n=e[t],s=typeof n;(s==="object"||s==="function")&&!Object.isFrozen(n)&&Tt(n)}),e}var ye=class{constructor(t){t.data===void 0&&(t.data={}),this.data=t.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}};function Lt(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function G(e,...t){let n=Object.create(null);for(let s in e)n[s]=e[s];return t.forEach(function(s){for(let r in s)n[r]=s[r]}),n}var Bn="</span>",_t=e=>!!e.scope,Fn=(e,{prefix:t})=>{if(e.startsWith("language:"))return e.replace("language:","language-");if(e.includes(".")){let n=e.split(".");return[`${t}${n.shift()}`,...n.map((s,r)=>`${s}${"_".repeat(r+1)}`)].join(" ")}return`${t}${e}`},ke=class{constructor(t,n){this.buffer="",this.classPrefix=n.classPrefix,t.walk(this)}addText(t){this.buffer+=Lt(t)}openNode(t){if(!_t(t))return;let n=Fn(t.scope,{prefix:this.classPrefix});this.span(n)}closeNode(t){_t(t)&&(this.buffer+=Bn)}value(){return this.buffer}span(t){this.buffer+=`<span class="${t}">`}},vt=(e={})=>{let t={children:[]};return Object.assign(t,e),t},De=class e{constructor(){this.rootNode=vt(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(t){this.top.children.push(t)}openNode(t){let n=vt({scope:t});this.add(n),this.stack.push(n)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(t){return this.constructor._walk(t,this.rootNode)}static _walk(t,n){return typeof n=="string"?t.addText(n):n.children&&(t.openNode(n),n.children.forEach(s=>this._walk(t,s)),t.closeNode(n)),t}static _collapse(t){typeof t!="string"&&t.children&&(t.children.every(n=>typeof n=="string")?t.children=[t.children.join("")]:t.children.forEach(n=>{e._collapse(n)}))}},Be=class extends De{constructor(t){super(),this.options=t}addText(t){t!==""&&this.add(t)}startScope(t){this.openNode(t)}endScope(){this.closeNode()}__addSublanguage(t,n){let s=t.root;n&&(s.scope=`language:${n}`),this.add(s)}toHTML(){return new ke(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}};function ae(e){return e?typeof e=="string"?e:e.source:null}function xt(e){return Z("(?=",e,")")}function Pn(e){return Z("(?:",e,")*")}function qn(e){return Z("(?:",e,")?")}function Z(...e){return e.map(n=>ae(n)).join("")}function Wn(e){let t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Pe(...e){return"("+(Wn(e).capture?"":"?:")+e.map(s=>ae(s)).join("|")+")"}function At(e){return new RegExp(e.toString()+"|").exec("").length-1}function Un(e,t){let n=e&&e.exec(t);return n&&n.index===0}var jn=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function qe(e,{joinWith:t}){let n=0;return e.map(s=>{n+=1;let r=n,l=ae(s),i="";for(;l.length>0;){let o=jn.exec(l);if(!o){i+=l;break}i+=l.substring(0,o.index),l=l.substring(o.index+o[0].length),o[0][0]==="\\"&&o[1]?i+="\\"+String(Number(o[1])+r):(i+=o[0],o[0]==="("&&n++)}return i}).map(s=>`(${s})`).join(t)}var zn=/\b\B/,Ct="[a-zA-Z]\\w*",We="[a-zA-Z_]\\w*",Rt="\\b\\d+(\\.\\d+)?",Nt="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Ot="\\b(0b[01]+)",Gn="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",Kn=(e={})=>{let t=/^#![ ]*\//;return e.binary&&(e.begin=Z(t,/.*\b/,e.binary,/\b.*/)),G({scope:"meta",begin:t,end:/$/,relevance:0,"on:begin":(n,s)=>{n.index!==0&&s.ignoreMatch()}},e)},ue={begin:"\\\\[\\s\\S]",relevance:0},Xn={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ue]},Vn={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ue]},Zn={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},we=function(e,t,n={}){let s=G({scope:"comment",begin:e,end:t,contains:[]},n);s.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});let r=Pe("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return s.contains.push({begin:Z(/[ ]+/,"(",r,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),s},Yn=we("//","$"),Qn=we("/\\*","\\*/"),Jn=we("#","$"),es={scope:"number",begin:Rt,relevance:0},ts={scope:"number",begin:Nt,relevance:0},ns={scope:"number",begin:Ot,relevance:0},ss={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ue,{begin:/\[/,end:/\]/,relevance:0,contains:[ue]}]},rs={scope:"title",begin:Ct,relevance:0},is={scope:"title",begin:We,relevance:0},os={begin:"\\.\\s*"+We,relevance:0},ls=function(e){return Object.assign(e,{"on:begin":(t,n)=>{n.data._beginMatch=t[1]},"on:end":(t,n)=>{n.data._beginMatch!==t[1]&&n.ignoreMatch()}})},ve=Object.freeze({__proto__:null,APOS_STRING_MODE:Xn,BACKSLASH_ESCAPE:ue,BINARY_NUMBER_MODE:ns,BINARY_NUMBER_RE:Ot,COMMENT:we,C_BLOCK_COMMENT_MODE:Qn,C_LINE_COMMENT_MODE:Yn,C_NUMBER_MODE:ts,C_NUMBER_RE:Nt,END_SAME_AS_BEGIN:ls,HASH_COMMENT_MODE:Jn,IDENT_RE:Ct,MATCH_NOTHING_RE:zn,METHOD_GUARD:os,NUMBER_MODE:es,NUMBER_RE:Rt,PHRASAL_WORDS_MODE:Zn,QUOTE_STRING_MODE:Vn,REGEXP_MODE:ss,RE_STARTERS_RE:Gn,SHEBANG:Kn,TITLE_MODE:rs,UNDERSCORE_IDENT_RE:We,UNDERSCORE_TITLE_MODE:is});function cs(e,t){e.input[e.index-1]==="."&&t.ignoreMatch()}function as(e,t){e.className!==void 0&&(e.scope=e.className,delete e.className)}function us(e,t){t&&e.beginKeywords&&(e.begin="\\b("+e.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",e.__beforeBegin=cs,e.keywords=e.keywords||e.beginKeywords,delete e.beginKeywords,e.relevance===void 0&&(e.relevance=0))}function ds(e,t){Array.isArray(e.illegal)&&(e.illegal=Pe(...e.illegal))}function fs(e,t){if(e.match){if(e.begin||e.end)throw new Error("begin & end are not supported with match");e.begin=e.match,delete e.match}}function gs(e,t){e.relevance===void 0&&(e.relevance=1)}var ps=(e,t)=>{if(!e.beforeMatch)return;if(e.starts)throw new Error("beforeMatch cannot be used with starts");let n=Object.assign({},e);Object.keys(e).forEach(s=>{delete e[s]}),e.keywords=n.keywords,e.begin=Z(n.beforeMatch,xt(n.begin)),e.starts={relevance:0,contains:[Object.assign(n,{endsParent:!0})]},e.relevance=0,delete n.beforeMatch},hs=["of","and","for","in","not","or","if","then","parent","list","value"],ms="keyword";function It(e,t,n=ms){let s=Object.create(null);return typeof e=="string"?r(n,e.split(" ")):Array.isArray(e)?r(n,e):Object.keys(e).forEach(function(l){Object.assign(s,It(e[l],t,l))}),s;function r(l,i){t&&(i=i.map(o=>o.toLowerCase())),i.forEach(function(o){let c=o.split("|");s[c[0]]=[l,bs(c[0],c[1])]})}}function bs(e,t){return t?Number(t):Es(e)?0:1}function Es(e){return hs.includes(e.toLowerCase())}var yt={},V=e=>{console.error(e)},Mt=(e,...t)=>{console.log(`WARN: ${e}`,...t)},te=(e,t)=>{yt[`${e}/${t}`]||(console.log(`Deprecated as of ${e}. ${t}`),yt[`${e}/${t}`]=!0)},Me=new Error;function Ht(e,t,{key:n}){let s=0,r=e[n],l={},i={};for(let o=1;o<=t.length;o++)i[o+s]=r[o],l[o+s]=!0,s+=At(t[o-1]);e[n]=i,e[n]._emit=l,e[n]._multi=!0}function _s(e){if(Array.isArray(e.begin)){if(e.skip||e.excludeBegin||e.returnBegin)throw V("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),Me;if(typeof e.beginScope!="object"||e.beginScope===null)throw V("beginScope must be object"),Me;Ht(e,e.begin,{key:"beginScope"}),e.begin=qe(e.begin,{joinWith:""})}}function vs(e){if(Array.isArray(e.end)){if(e.skip||e.excludeEnd||e.returnEnd)throw V("skip, excludeEnd, returnEnd not compatible with endScope: {}"),Me;if(typeof e.endScope!="object"||e.endScope===null)throw V("endScope must be object"),Me;Ht(e,e.end,{key:"endScope"}),e.end=qe(e.end,{joinWith:""})}}function ys(e){e.scope&&typeof e.scope=="object"&&e.scope!==null&&(e.beginScope=e.scope,delete e.scope)}function Ms(e){ys(e),typeof e.beginScope=="string"&&(e.beginScope={_wrap:e.beginScope}),typeof e.endScope=="string"&&(e.endScope={_wrap:e.endScope}),_s(e),vs(e)}function ws(e){function t(i,o){return new RegExp(ae(i),"m"+(e.case_insensitive?"i":"")+(e.unicodeRegex?"u":"")+(o?"g":""))}class n{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(o,c){c.position=this.position++,this.matchIndexes[this.matchAt]=c,this.regexes.push([c,o]),this.matchAt+=At(o)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);let o=this.regexes.map(c=>c[1]);this.matcherRe=t(qe(o,{joinWith:"|"}),!0),this.lastIndex=0}exec(o){this.matcherRe.lastIndex=this.lastIndex;let c=this.matcherRe.exec(o);if(!c)return null;let d=c.findIndex((M,w)=>w>0&&M!==void 0),p=this.matchIndexes[d];return c.splice(0,d),Object.assign(c,p)}}class s{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(o){if(this.multiRegexes[o])return this.multiRegexes[o];let c=new n;return this.rules.slice(o).forEach(([d,p])=>c.addRule(d,p)),c.compile(),this.multiRegexes[o]=c,c}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(o,c){this.rules.push([o,c]),c.type==="begin"&&this.count++}exec(o){let c=this.getMatcher(this.regexIndex);c.lastIndex=this.lastIndex;let d=c.exec(o);if(this.resumingScanAtSamePosition()&&!(d&&d.index===this.lastIndex)){let p=this.getMatcher(0);p.lastIndex=this.lastIndex+1,d=p.exec(o)}return d&&(this.regexIndex+=d.position+1,this.regexIndex===this.count&&this.considerAll()),d}}function r(i){let o=new s;return i.contains.forEach(c=>o.addRule(c.begin,{rule:c,type:"begin"})),i.terminatorEnd&&o.addRule(i.terminatorEnd,{type:"end"}),i.illegal&&o.addRule(i.illegal,{type:"illegal"}),o}function l(i,o){let c=i;if(i.isCompiled)return c;[as,fs,Ms,ps].forEach(p=>p(i,o)),e.compilerExtensions.forEach(p=>p(i,o)),i.__beforeBegin=null,[us,ds,gs].forEach(p=>p(i,o)),i.isCompiled=!0;let d=null;return typeof i.keywords=="object"&&i.keywords.$pattern&&(i.keywords=Object.assign({},i.keywords),d=i.keywords.$pattern,delete i.keywords.$pattern),d=d||/\w+/,i.keywords&&(i.keywords=It(i.keywords,e.case_insensitive)),c.keywordPatternRe=t(d,!0),o&&(i.begin||(i.begin=/\B|\b/),c.beginRe=t(c.begin),!i.end&&!i.endsWithParent&&(i.end=/\B|\b/),i.end&&(c.endRe=t(c.end)),c.terminatorEnd=ae(c.end)||"",i.endsWithParent&&o.terminatorEnd&&(c.terminatorEnd+=(i.end?"|":"")+o.terminatorEnd)),i.illegal&&(c.illegalRe=t(i.illegal)),i.contains||(i.contains=[]),i.contains=[].concat(...i.contains.map(function(p){return Ss(p==="self"?i:p)})),i.contains.forEach(function(p){l(p,c)}),i.starts&&l(i.starts,o),c.matcher=r(c),c}if(e.compilerExtensions||(e.compilerExtensions=[]),e.contains&&e.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return e.classNameAliases=G(e.classNameAliases||{}),l(e)}function $t(e){return e?e.endsWithParent||$t(e.starts):!1}function Ss(e){return e.variants&&!e.cachedVariants&&(e.cachedVariants=e.variants.map(function(t){return G(e,{variants:null},t)})),e.cachedVariants?e.cachedVariants:$t(e)?G(e,{starts:e.starts?G(e.starts):null}):Object.isFrozen(e)?G(e):e}var Ts="11.11.1",Fe=class extends Error{constructor(t,n){super(t),this.name="HTMLInjectionError",this.html=n}},$e=Lt,wt=G,St=Symbol("nomatch"),Ls=7,kt=function(e){let t=Object.create(null),n=Object.create(null),s=[],r=!0,l="Could not find the language '{}', did you forget to load/include a language module?",i={disableAutodetect:!0,name:"Plain text",contains:[]},o={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:Be};function c(a){return o.noHighlightRe.test(a)}function d(a){let g=a.className+" ";g+=a.parentNode?a.parentNode.className:"";let b=o.languageDetectRe.exec(g);if(b){let v=q(b[1]);return v||(Mt(l.replace("{}",b[1])),Mt("Falling back to no-highlight mode for this block.",a)),v?b[1]:"no-highlight"}return g.split(/\s+/).find(v=>c(v)||q(v))}function p(a,g,b){let v="",S="";typeof g=="object"?(v=a,b=g.ignoreIllegals,S=g.language):(te("10.7.0","highlight(lang, code, ...args) has been deprecated."),te("10.7.0",`Please use highlight(code, options) instead.
|
|
2
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),S=a,v=g),b===void 0&&(b=!0);let k={code:v,language:S};me("before:highlight",k);let z=k.result?k.result:M(k.language,k.code,b);return z.code=k.code,me("after:highlight",z),z}function M(a,g,b,v){let S=Object.create(null);function k(u,f){return u.keywords[f]}function z(){if(!h.keywords){T.addText(y);return}let u=0;h.keywordPatternRe.lastIndex=0;let f=h.keywordPatternRe.exec(y),m="";for(;f;){m+=y.substring(u,f.index);let _=B.case_insensitive?f[0].toLowerCase():f[0],L=k(h,_);if(L){let[W,Tn]=L;if(T.addText(m),m="",S[_]=(S[_]||0)+1,S[_]<=Ls&&(_e+=Tn),W.startsWith("_"))m+=f[0];else{let Ln=B.classNameAliases[W]||W;D(f[0],Ln)}}else m+=f[0];u=h.keywordPatternRe.lastIndex,f=h.keywordPatternRe.exec(y)}m+=y.substring(u),T.addText(m)}function be(){if(y==="")return;let u=null;if(typeof h.subLanguage=="string"){if(!t[h.subLanguage]){T.addText(y);return}u=M(h.subLanguage,y,!0,ut[h.subLanguage]),ut[h.subLanguage]=u._top}else u=A(y,h.subLanguage.length?h.subLanguage:null);h.relevance>0&&(_e+=u.relevance),T.__addSublanguage(u._emitter,u.language)}function O(){h.subLanguage!=null?be():z(),y=""}function D(u,f){u!==""&&(T.startScope(f),T.addText(u),T.endScope())}function ot(u,f){let m=1,_=f.length-1;for(;m<=_;){if(!u._emit[m]){m++;continue}let L=B.classNameAliases[u[m]]||u[m],W=f[m];L?D(W,L):(y=W,z(),y=""),m++}}function lt(u,f){return u.scope&&typeof u.scope=="string"&&T.openNode(B.classNameAliases[u.scope]||u.scope),u.beginScope&&(u.beginScope._wrap?(D(y,B.classNameAliases[u.beginScope._wrap]||u.beginScope._wrap),y=""):u.beginScope._multi&&(ot(u.beginScope,f),y="")),h=Object.create(u,{parent:{value:h}}),h}function ct(u,f,m){let _=Un(u.endRe,m);if(_){if(u["on:end"]){let L=new ye(u);u["on:end"](f,L),L.isMatchIgnored&&(_=!1)}if(_){for(;u.endsParent&&u.parent;)u=u.parent;return u}}if(u.endsWithParent)return ct(u.parent,f,m)}function vn(u){return h.matcher.regexIndex===0?(y+=u[0],1):(He=!0,0)}function yn(u){let f=u[0],m=u.rule,_=new ye(m),L=[m.__beforeBegin,m["on:begin"]];for(let W of L)if(W&&(W(u,_),_.isMatchIgnored))return vn(f);return m.skip?y+=f:(m.excludeBegin&&(y+=f),O(),!m.returnBegin&&!m.excludeBegin&&(y=f)),lt(m,u),m.returnBegin?0:f.length}function Mn(u){let f=u[0],m=g.substring(u.index),_=ct(h,u,m);if(!_)return St;let L=h;h.endScope&&h.endScope._wrap?(O(),D(f,h.endScope._wrap)):h.endScope&&h.endScope._multi?(O(),ot(h.endScope,u)):L.skip?y+=f:(L.returnEnd||L.excludeEnd||(y+=f),O(),L.excludeEnd&&(y=f));do h.scope&&T.closeNode(),!h.skip&&!h.subLanguage&&(_e+=h.relevance),h=h.parent;while(h!==_.parent);return _.starts&<(_.starts,u),L.returnEnd?0:f.length}function wn(){let u=[];for(let f=h;f!==B;f=f.parent)f.scope&&u.unshift(f.scope);u.forEach(f=>T.openNode(f))}let Ee={};function at(u,f){let m=f&&f[0];if(y+=u,m==null)return O(),0;if(Ee.type==="begin"&&f.type==="end"&&Ee.index===f.index&&m===""){if(y+=g.slice(f.index,f.index+1),!r){let _=new Error(`0 width match regex (${a})`);throw _.languageName=a,_.badRule=Ee.rule,_}return 1}if(Ee=f,f.type==="begin")return yn(f);if(f.type==="illegal"&&!b){let _=new Error('Illegal lexeme "'+m+'" for mode "'+(h.scope||"<unnamed>")+'"');throw _.mode=h,_}else if(f.type==="end"){let _=Mn(f);if(_!==St)return _}if(f.type==="illegal"&&m==="")return y+=`
|
|
3
|
-
`,1;if(Ie>1e5&&Ie>f.index*3)throw new Error("potential infinite loop, way more iterations than matches");return y+=m,m.length}let B=q(a);if(!B)throw V(l.replace("{}",a)),new Error('Unknown language: "'+a+'"');let Sn=ws(B),Oe="",h=v||Sn,ut={},T=new o.__emitter(o);wn();let y="",_e=0,X=0,Ie=0,He=!1;try{if(B.__emitTokens)B.__emitTokens(g,T);else{for(h.matcher.considerAll();;){Ie++,He?He=!1:h.matcher.considerAll(),h.matcher.lastIndex=X;let u=h.matcher.exec(g);if(!u)break;let f=g.substring(X,u.index),m=at(f,u);X=u.index+m}at(g.substring(X))}return T.finalize(),Oe=T.toHTML(),{language:a,value:Oe,relevance:_e,illegal:!1,_emitter:T,_top:h}}catch(u){if(u.message&&u.message.includes("Illegal"))return{language:a,value:$e(g),illegal:!0,relevance:0,_illegalBy:{message:u.message,index:X,context:g.slice(X-100,X+100),mode:u.mode,resultSoFar:Oe},_emitter:T};if(r)return{language:a,value:$e(g),illegal:!1,relevance:0,errorRaised:u,_emitter:T,_top:h};throw u}}function w(a){let g={value:$e(a),illegal:!1,relevance:0,_top:i,_emitter:new o.__emitter(o)};return g._emitter.addText(a),g}function A(a,g){g=g||o.languages||Object.keys(t);let b=w(a),v=g.filter(q).filter(he).map(O=>M(O,a,!1));v.unshift(b);let S=v.sort((O,D)=>{if(O.relevance!==D.relevance)return D.relevance-O.relevance;if(O.language&&D.language){if(q(O.language).supersetOf===D.language)return 1;if(q(D.language).supersetOf===O.language)return-1}return 0}),[k,z]=S,be=k;return be.secondBest=z,be}function $(a,g,b){let v=g&&n[g]||b;a.classList.add("hljs"),a.classList.add(`language-${v}`)}function C(a){let g=null,b=d(a);if(c(b))return;if(me("before:highlightElement",{el:a,language:b}),a.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",a);return}if(a.children.length>0&&(o.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(a)),o.throwUnescapedHTML))throw new Fe("One of your code blocks includes unescaped HTML.",a.innerHTML);g=a;let v=g.textContent,S=b?p(v,{language:b,ignoreIllegals:!0}):A(v);a.innerHTML=S.value,a.dataset.highlighted="yes",$(a,b,S.language),a.result={language:S.language,re:S.relevance,relevance:S.relevance},S.secondBest&&(a.secondBest={language:S.secondBest.language,relevance:S.secondBest.relevance}),me("after:highlightElement",{el:a,result:S,text:v})}function N(a){o=wt(o,a)}let le=()=>{ce(),te("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function pe(){ce(),te("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Re=!1;function ce(){function a(){ce()}if(document.readyState==="loading"){Re||window.addEventListener("DOMContentLoaded",a,!1),Re=!0;return}document.querySelectorAll(o.cssSelector).forEach(C)}function rt(a,g){let b=null;try{b=g(e)}catch(v){if(V("Language definition for '{}' could not be registered.".replace("{}",a)),r)V(v);else throw v;b=i}b.name||(b.name=a),t[a]=b,b.rawDefinition=g.bind(null,e),b.aliases&&Ne(b.aliases,{languageName:a})}function K(a){delete t[a];for(let g of Object.keys(n))n[g]===a&&delete n[g]}function it(){return Object.keys(t)}function q(a){return a=(a||"").toLowerCase(),t[a]||t[n[a]]}function Ne(a,{languageName:g}){typeof a=="string"&&(a=[a]),a.forEach(b=>{n[b.toLowerCase()]=g})}function he(a){let g=q(a);return g&&!g.disableAutodetect}function mn(a){a["before:highlightBlock"]&&!a["before:highlightElement"]&&(a["before:highlightElement"]=g=>{a["before:highlightBlock"](Object.assign({block:g.el},g))}),a["after:highlightBlock"]&&!a["after:highlightElement"]&&(a["after:highlightElement"]=g=>{a["after:highlightBlock"](Object.assign({block:g.el},g))})}function bn(a){mn(a),s.push(a)}function En(a){let g=s.indexOf(a);g!==-1&&s.splice(g,1)}function me(a,g){let b=a;s.forEach(function(v){v[b]&&v[b](g)})}function _n(a){return te("10.7.0","highlightBlock will be removed entirely in v12.0"),te("10.7.0","Please use highlightElement now."),C(a)}Object.assign(e,{highlight:p,highlightAuto:A,highlightAll:ce,highlightElement:C,highlightBlock:_n,configure:N,initHighlighting:le,initHighlightingOnLoad:pe,registerLanguage:rt,unregisterLanguage:K,listLanguages:it,getLanguage:q,registerAliases:Ne,autoDetection:he,inherit:wt,addPlugin:bn,removePlugin:En}),e.debugMode=function(){r=!1},e.safeMode=function(){r=!0},e.versionString=Ts,e.regex={concat:Z,lookahead:xt,either:Pe,optional:qn,anyNumberOfTimes:Pn};for(let a in ve)typeof ve[a]=="object"&&Tt(ve[a]);return Object.assign(e,ve),e},ne=kt({});ne.newInstance=()=>kt({});Dt.exports=ne;ne.HighlightJS=ne;ne.default=ne});function R(e,t){return(t||document).querySelector(e)}function E(e,t){return Array.from((t||document).querySelectorAll(e))}function F(e,t,n,s){typeof n=="function"?e.addEventListener(t,n):e.addEventListener(t,function(r){let l=r.target.closest(n);l&&e.contains(l)&&s&&s.call(l,r)})}var $n={"&":"&","<":"<",">":">",'"':""","'":"'"};function I(e){return e.replace(/[&<>"']/g,t=>$n[t])}function ft(e){return J(this,null,function*(){let t=new TextEncoder().encode(e),n=yield crypto.subtle.digest("SHA-1",t);return Array.from(new Uint8Array(n,0,4),s=>s.toString(16).padStart(2,"0")).join("")})}var kn=90,Dn=75;function P(e){return e>=kn?"green":e>=Dn?"yellow":"red"}function x(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,",")}function U(e){return(Math.floor(e*100)/100).toFixed(2)}function gt(e){return"g-"+e.replace(/[^a-zA-Z0-9_-]/gu,t=>`_${t.codePointAt(0).toString(16)}_`)}var pt=[[31536e3,"year"],[2592e3,"month"],[86400,"day"],[3600,"hour"],[60,"minute"],[1,"second"]];function ht(e){let t=Math.floor((Date.now()-e.getTime())/1e3);for(let[n,s]of pt){let r=Math.floor(t/n);if(r>=1)return r===1?`about 1 ${s} ago`:`${r} ${s}s ago`}return"just now"}function mt(e){let t=(Date.now()-e.getTime())/1e3;for(let[n]of pt){let s=Math.floor(t/n);if(s>=1){let r=(s+1)*n;return Math.max((r-t)*1e3+500,1e3)}}return 1e3}var bt={};function ee(e){return bt[e]}function Et(e){return J(this,null,function*(){let t=yield Promise.all(e.map(ft));e.forEach((n,s)=>{bt[n]=t[s]})})}var Ft=Hn(Bt(),1);var Ue=Ft.default;function Pt(e){let t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",s=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),r=t.concat(s,/(::\w+)*/),i={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},o={className:"doctag",begin:"@[A-Za-z]+"},c={begin:"#<",end:">"},d=[e.COMMENT("#","$",{contains:[o]}),e.COMMENT("^=begin","^=end",{contains:[o],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],p={className:"subst",begin:/#\{/,end:/\}/,keywords:i},M={className:"string",contains:[e.BACKSLASH_ESCAPE,p],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,p]})]}]},w="[1-9](_?[0-9])*|0",A="[0-9](_?[0-9])*",$={className:"number",relevance:0,variants:[{begin:`\\b(${w})(\\.(${A}))?([eE][+-]?(${A})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},C={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:i}]},K=[M,{variants:[{match:[/class\s+/,r,/\s+<\s+/,r]},{match:[/\b(class|module)\s+/,r]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:i},{match:[/(include|extend)\s+/,r],scope:{2:"title.class"},keywords:i},{relevance:0,match:[r,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:s,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[C]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[M,{begin:n}],relevance:0},$,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:i},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,p],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(c,d),relevance:0}].concat(c,d);p.contains=K,C.contains=K;let he=[{begin:/^\s*=>/,starts:{end:"$",contains:K}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:i,contains:K}}];return d.unshift(c),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:i,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(he).concat(d).concat(K)}}function ze(e){let t=P(e),n=U(e);return`<div class="bar-sizer"><div class="coverage-bar"><div class="coverage-bar__fill coverage-bar__fill--${t}" style="width: ${n}%"></div></div></div>`}function Y(e,t,n,s,r){let l=P(e),i=U(e),o=`<div class="coverage-cell">${ze(e)}<span class="coverage-pct">${i}%</span></div>`;if(r)return`<td class="cell--coverage strong t-totals__${s}-pct ${l}">${o}</td><td class="cell--numerator strong t-totals__${s}-num">${x(t)}/</td><td class="cell--denominator strong t-totals__${s}-den">${x(n)}</td>`;let c=` data-order="${U(e)}"`;return`<td class="cell--coverage cell--${s}-pct ${l}"${c}>${o}</td><td class="cell--numerator">${x(t)}/</td><td class="cell--denominator">${x(n)}</td>`}function Se(e,t,n,s){return`<th class="cell--coverage">
|
|
4
|
-
<div class="th-with-filter">
|
|
5
|
-
<span class="th-label">${e}</span>
|
|
6
|
-
<div class="col-filter__coverage">
|
|
7
|
-
<select class="col-filter__op" data-type="${t}"><option value="lt"><</option><option value="lte" selected>≤</option><option value="eq">=</option><option value="gte">≥</option><option value="gt">></option></select>
|
|
8
|
-
<span class="col-filter__pct-wrap"><input type="number" class="col-filter__value" min="0" max="100" data-type="${t}" value="100" step="any"></span>
|
|
9
|
-
</div>
|
|
10
|
-
</div>
|
|
11
|
-
</th>
|
|
12
|
-
<th class="cell--numerator">${n}</th>
|
|
13
|
-
<th class="cell--denominator">${s}</th>`}function je(e){let{type:t,label:n,covered:s,total:r,enabled:l,toggle:i}=e;if(!l)return`<div class="t-${t}-summary">
|
|
14
|
-
${n}: <span class="coverage-disabled">disabled</span>
|
|
15
|
-
</div>`;let o=r-s,c=r>0?s*100/r:100,d=P(c),p=e.suffix||"covered",M=e.missedClass||"red",w=`<div class="t-${t}-summary">
|
|
16
|
-
${n}: <span class="${d}"><b>${U(c)}%</b></span><span class="coverage-cell__fraction"> ${s}/${r} ${p}</span>`;if(o>0){let A=i?`<a href="#" class="t-missed-method-toggle"><b>${o}</b> missed</a>`:`<span class="${M}"><b>${o}</b> missed</span>`;w+=`<span class="coverage-cell__fraction">,</span>
|
|
17
|
-
${A}`}return w+=`
|
|
18
|
-
</div>`,w}function qt(e){return'<div class="summary-stats">'+je({type:"line",label:"Line coverage",covered:e.coveredLines,total:e.totalLines,enabled:!0,suffix:"relevant lines covered"})+je({type:"branch",label:"Branch coverage",covered:e.coveredBranches,total:e.totalBranches,enabled:e.branchCoverage,missedClass:"missed-branch-text"})+je({type:"method",label:"Method coverage",covered:e.coveredMethods,total:e.totalMethods,enabled:e.methodCoverage,missedClass:"missed-method-text-color",toggle:e.showMethodToggle})+"</div>"}function xs(e){let{title:t,filenames:n,stats:s,branchCoverage:r,methodCoverage:l}=e,i=gt(t),o=s.lines,c=r?s.branches:void 0,d=l?s.methods:void 0,p=[`<div class="file_list_container" id="${i}" data-total-files="${n.length}">`,`<span class="group_name hide">${I(t)}</span>`,`<span class="covered_percent hide"><span class="${P(o.percent)}">${U(o.percent)}%</span></span>`,'<div class="file_list--responsive"><table class="file_list"><thead><tr>','<th class="cell--left"><div class="th-with-filter"><span class="th-label">File Name</span><input type="search" class="col-filter col-filter--name" placeholder="Filter paths\u2026"></div></th>',Se("Line Coverage","line","Covered","Lines")];r&&p.push(Se("Branch Coverage","branch","Covered","Branches")),l&&p.push(Se("Method Coverage","method","Covered","Methods")),p.push("</tr>");let M=n.length===1?"file":"files";return p.push(`<tr class="totals-row"><td class="strong t-file-count">${x(n.length)} ${M}</td>`,Y(o.percent,o.covered,o.total,"line",!0)),c&&p.push(Y(c.percent,c.covered,c.total,"branch",!0)),d&&p.push(Y(d.percent,d.covered,d.total,"method",!0)),p.push("</tr></thead><tbody>"),p.join("")}function As(e){let{filename:t,coverage:n,branchCoverage:s,methodCoverage:r}=e,l=ee(t),i=[`data-covered-lines="${n.covered_lines}"`,`data-relevant-lines="${n.total_lines}"`];s&&i.push(`data-covered-branches="${n.covered_branches||0}"`,`data-total-branches="${n.total_branches||0}"`),r&&i.push(`data-covered-methods="${n.covered_methods||0}"`,`data-total-methods="${n.total_methods||0}"`);let o=[`<tr class="t-file" ${i.join(" ")}>`,`<td class="strong t-file__name"><a href="#${l}" class="src_link" title="${I(t)}">${I(t)}</a></td>`,Y(n.lines_covered_percent,n.covered_lines,n.total_lines,"line",!1)];if(s){let c=n.branches_covered_percent===void 0?100:n.branches_covered_percent;o.push(Y(c,n.covered_branches||0,n.total_branches||0,"branch",!1))}if(r){let c=n.methods_covered_percent===void 0?100:n.methods_covered_percent;o.push(Y(c,n.covered_methods||0,n.total_methods||0,"method",!1))}return o.push("</tr>"),o.join("")}function Ge(e){let{filenames:t,allCoverage:n,branchCoverage:s,methodCoverage:r}=e,l=[xs(e)];for(let i of t){let o=n[i];o&&l.push(As({filename:i,coverage:o,branchCoverage:s,methodCoverage:r}))}return l.push("</tbody></table></div></div>"),l.join("")}function Cs(e){let{lineIndex:t,lineCov:n,branchesReport:s,missedMethodLines:r,branchCoverage:l,methodCoverage:i}=e,o=t+1;if(n==="ignored")return"skipped";if(l){let c=s[o];if(c&&c.some(([,d])=>d===0))return"missed-branch"}return i&&r.has(o)?"missed-method":n===null?"never":n===0?"missed":"covered"}function Rs(e){let t={};if(!e)return t;for(let{coverage:n,report_line:s,type:r}of e){if(n==="ignored")continue;(t[s]||(t[s]=[])).push([r,n])}return t}function Ns(e){let t=new Set;if(!e)return t;for(let n of e)if(n.coverage===0&&n.start_line&&n.end_line)for(let s=n.start_line;s<=n.end_line;s++)t.add(s);return t}function Os(e){let{index:t,source:n,lineCov:s,status:r,branchCoverage:l,lineBranches:i}=e,o=t+1,c=s!==null&&s!=="ignored"?` data-hits="${s}"`:"",d=[`<li class="${r}"${c} data-linenumber="${o}">`];if(r==="covered"||s!==null&&s!=="ignored"&&s!==0?d.push(`<span class="hits" data-content="${s}"></span>`):s==="ignored"&&d.push('<span class="hits" data-content="skipped"></span>'),l&&i)for(let[p,M]of i){let w=I(p);d.push(`<span class="hits" data-content="${w}: ${M}" title="${w} branch hit ${M} times"></span>`)}return d.push(`<code class="ruby">${I(n)}</code></li>`),d.join("")}function Wt(e,t,n,s){let r=ee(e),l=t.covered_lines,i=t.total_lines,o=n&&t.covered_branches||0,c=n&&t.total_branches||0,d=s&&t.covered_methods||0,p=s&&t.total_methods||0,M=(t.methods||[]).filter(N=>N.coverage===0),w=s&&M.length>0,A=Rs(t.branches),$=Ns(t.methods),C=[`<div class="source_table" id="${r}">`,'<div class="header">',`<h2>${I(e)}</h2>`,qt({coveredLines:l,totalLines:i,coveredBranches:o,totalBranches:c,coveredMethods:d,totalMethods:p,branchCoverage:n,methodCoverage:s,showMethodToggle:w})];w&&C.push('<div class="t-missed-method-list" style="display: none"><ul>',M.map(N=>`<li><tt>${I(N.name)}</tt></li>`).join(""),"</ul></div>"),C.push("</div>","<pre><ol>");for(let N=0;N<t.source.length;N++){let le=t.lines[N],pe=Cs({lineIndex:N,lineCov:le,branchesReport:A,missedMethodLines:$,branchCoverage:n,methodCoverage:s});C.push(Os({index:N,source:t.source[N],lineCov:le,status:pe,branchCoverage:n,lineBranches:n?A[N+1]:void 0}))}return C.push("</ol></pre></div>"),C.join("")}Ue.registerLanguage("ruby",Pt);var se=null;function Ut(e){let t=e.meta,n=t.branch_coverage,s=t.method_coverage;document.title=`Code coverage for ${t.project_name}`;let r=Object.keys(e.coverage),l=e.total.lines.total>0?e.total.lines.percent:100,i=document.createElement("link");i.rel="icon",i.type="image/png",i.href=`favicon_${P(l)}.png`,document.head.appendChild(i),n&&document.body.setAttribute("data-branch-coverage","true");let o=document.getElementById("content"),c=[Ge({title:"All Files",filenames:r,stats:e.total,allCoverage:e.coverage,branchCoverage:n,methodCoverage:s})];for(let $ of Object.keys(e.groups)){let C=e.groups[$];c.push(Ge({title:$,filenames:C.files||[],stats:C,allCoverage:e.coverage,branchCoverage:n,methodCoverage:s}))}o.innerHTML=c.join("");let d={};for(let $ of r)d[ee($)]=$;se={idToFilename:d,coverage:e.coverage,branchCoverage:n,methodCoverage:s};let p=new Date(t.timestamp),M=document.getElementById("footer");M.innerHTML=`Generated <abbr class="timeago" title="${p.toISOString()}">${p.toISOString()}</abbr> by <a href="https://github.com/simplecov-ruby/simplecov">simplecov</a> v${I(t.simplecov_version)} using ${I(t.command_name)}`;let w=document.getElementById("source-legend"),A='<span class="source-legend__item"><span class="source-legend__swatch source-legend__swatch--covered"></span>Covered</span><span class="source-legend__item"><span class="source-legend__swatch source-legend__swatch--skipped"></span>Skipped</span><span class="source-legend__item"><span class="source-legend__swatch source-legend__swatch--missed"></span>Missed line</span>';n&&(A+='<span class="source-legend__item"><span class="source-legend__swatch source-legend__swatch--missed-branch"></span>Missed branch</span>'),s&&(A+='<span class="source-legend__item"><span class="source-legend__swatch source-legend__swatch--missed-method"></span>Missed method</span>'),w.innerHTML=A}function jt(e){let t=document.getElementById(e);if(t)return t;if(!se)return null;let n=se.idToFilename[e];if(!n)return null;let s=Wt(n,se.coverage[n],se.branchCoverage,se.methodCoverage),r=document.querySelector(".source_files"),l=document.createElement("div");l.innerHTML=s;let i=l.firstElementChild;return r.appendChild(i),E("pre code",i).forEach(o=>Ue.highlightElement(o)),i}var Ke=1e3,Is="t-window-hidden",zt=new WeakSet;function Hs(e,t){let n=e.querySelector("tr.t-show-all");if(!n){n=document.createElement("tr"),n.className="t-show-all";let s=document.createElement("td");s.colSpan=t,n.appendChild(s),n.addEventListener("click",r=>{r.preventDefault(),zt.add(e),re(e.closest("table"))}),e.appendChild(n)}return n}function re(e){let t=e.querySelector("tbody");if(!t)return;let n=t.querySelectorAll("tr.t-file"),s=zt.has(t),r=0;if(n.forEach(i=>{let o=i.style.display==="none";o||(r+=1),i.classList.toggle(Is,!s&&!o&&r>Ke)}),s||r<=Ke){let i=t.querySelector("tr.t-show-all");i&&(i.style.display="none");return}let l=Hs(t,n[0].children.length);l.style.display="",l.firstElementChild.innerHTML=`Showing the first ${x(Ke)} of ${x(r)} files. <a href="#" class="t-show-all__link">Show all</a>`,t.appendChild(l)}var Xt={};function $s(e,t){let n=0,s=e.children;for(let r=0;r<s.length;r++)if(s[r].style.display!=="none"){if(n===t)return r;n+=1}return null}function ks(e){if(!e)return"";let t=e.getAttribute("data-order");if(t!==null)return Number.parseFloat(t);let n=(e.textContent||"").trim(),s=Number.parseFloat(n);return Number.isNaN(s)?n.toLowerCase():s}var Gt=new WeakMap;function Vt(e,t){var l;if(t===null)return"";let n=Gt.get(e);n||(n=new Map,Gt.set(e,n));let s=n.get(t);if(s!==void 0)return s;let r=ks((l=e.children[t])!=null?l:null);return n.set(t,r),r}var Ds=new Intl.Collator;function Zt(e,t){return typeof e=="number"&&typeof t=="number"?e-t:Ds.compare(String(e),String(t))}function Yt(e){return e.id||e.getAttribute("data-sort-id")||"default"}function Xe(e,t,n){Xt[Yt(e)]={colIndex:t,direction:n};let s=0;E("thead tr:first-child th",e).forEach(r=>{let l=Number.parseInt(r.getAttribute("colspan")||"1",10);r.classList.remove("sorting_asc","sorting_desc","sorting");let i=t>=s&&t<s+l;r.classList.add(i?n==="asc"?"sorting_asc":"sorting_desc":"sorting"),s+=l})}function Qt(e,t){let n=document.createDocumentFragment();t.forEach(s=>n.appendChild(s)),e.appendChild(n)}function Kt(e,t){let n=Xt[Yt(e)],s=n&&n.colIndex===t&&n.direction==="asc"?"desc":"asc",r=e.querySelector("tbody"),l=Array.from(r.querySelectorAll("tr.t-file"));if(l.length===0){Xe(e,t,s);return}if(n&&n.colIndex===t)l.reverse();else{let i=$s(l[0],t),o=l.map(d=>({row:d,value:Vt(d,i)})),c=s==="asc"?1:-1;o.sort((d,p)=>c*Zt(d.value,p.value)),l=o.map(({row:d})=>d)}Qt(r,l),re(e),Xe(e,t,s)}var Bs=500,de=null;function Fs(){if(de)return de;let e=document.createElement("div");return e.id="sort-overlay",e.innerHTML='<span id="sort-overlay-label">Sorting\u2026</span>',e.style.display="none",document.body.appendChild(e),de=e,e}function Ps(){let e=Fs();e.style.transition="none",e.style.opacity="1",e.style.display="flex"}function qs(){if(!de)return;let e=de;e.style.transition="opacity 0.15s",e.style.opacity="0",setTimeout(()=>{e.style.display="none"},150)}function Ws(e,t){if(e.querySelectorAll("tbody tr.t-file").length<Bs){Kt(e,t);return}Ps(),requestAnimationFrame(()=>requestAnimationFrame(()=>{Kt(e,t),qs()}))}function Us(e,t){let n=0;for(let s of E("thead tr:first-child th",e)){let r=Number.parseInt(s.getAttribute("colspan")||"1",10);if(s===t)return n+r-1;n+=r}return n}function js(e,t){let n=Array.from(e.children);if(t){let r=n.findIndex(l=>l.classList.contains(`cell--${t}-pct`));if(r!==-1)return r}let s=n.findIndex(r=>r.hasAttribute("data-order"));return s===-1?null:s}function zs(e,t){let n=e.querySelector("tbody");if(!n)return;let s=Array.from(n.querySelectorAll("tr.t-file"));if(s.length===0)return;let r=js(s[0],t);if(r===null)return;let l=s.map(i=>({row:i,value:Vt(i,r)}));l.sort((i,o)=>Zt(i.value,o.value)),Qt(n,l.map(({row:i})=>i)),Xe(e,r,"asc")}function Jt(e){E("table.file_list").forEach(t=>{E("thead tr:first-child th",t).forEach(n=>{n.classList.add("sorting"),n.style.cursor="pointer",n.addEventListener("click",()=>Ws(t,Us(t,n)))}),zs(t,e),re(t)})}var fe=null;function Te(){fe=null}function en(){if(fe)return fe;let e=E(".file_list_container").filter(t=>t.style.display!=="none");return e.length?(fe=E("tbody tr.t-file",e[0]).filter(t=>t.style.display!=="none"),fe):[]}var Gs=240,Ks=160;function tn(e,t){e.style.setProperty("--bar-sizer-width",t+"px")}function Ze(){E(".file_list_container").forEach(e=>{if(e.style.display==="none"||e.offsetWidth===0)return;let t=R("table.file_list",e);if(!t||!R(".bar-sizer",t))return;let n=t.closest(".file_list--responsive");if(!n)return;n.style.visibility="hidden";let s=Ks,r=Gs;for(;s<r;){let l=Math.ceil((s+r)/2);tn(t,l),t.offsetWidth,t.scrollWidth<=n.clientWidth?s=l:r=l-1}tn(t,s),n.style.visibility=""})}var Ve=0;function ie(){Ve||(Ve=requestAnimationFrame(()=>{Ve=0,Ze()}))}var Le={line:{covered:"coveredLines",total:"relevantLines"},branch:{covered:"coveredBranches",total:"totalBranches"},method:{covered:"coveredMethods",total:"totalMethods"}};function nn(e){let t=E("tbody tr.t-file",e).filter(l=>l.style.display!=="none");function n(l){return t.reduce((i,o)=>i+(Number.parseInt(o.dataset[l]||"0",10)||0),0)}let s=R(".t-file-count",e),r=Number.parseInt(e.getAttribute("data-total-files")||"0",10);if(s){let l=t.length===1?" file":" files";s.textContent=t.length===r?x(r)+l:x(t.length)+"/"+x(r)+l}for(let l of Object.keys(Le)){let i=Le[l],o=`.t-totals__${l}`;R(o+"-pct",e)&&Xs(e,o,n(i.covered),n(i.total))}}function Xs(e,t,n,s){let r=R(t+"-pct",e),l=R(t+"-num",e),i=R(t+"-den",e);if(s===0){r&&(r.innerHTML="",r.classList.remove("green","yellow","red")),l&&(l.textContent=""),i&&(i.textContent="");return}let o=n*100/s,c=P(o);r&&(r.innerHTML=`<div class="coverage-cell">${ze(o)}<span class="coverage-pct">${U(o)}%</span></div>`,r.classList.remove("green","yellow","red"),r.classList.add(c)),l&&(l.textContent=x(n)+"/"),i&&(i.textContent=x(s))}var Vs={gt:(e,t)=>e>t,gte:(e,t)=>e>=t,eq:(e,t)=>e===t,lte:(e,t)=>e<=t,lt:(e,t)=>e<t};function Zs(e,t,n){let s=Vs[e];return s?s(t,n):!0}function Ys(e){let t=[];for(let n of E(".col-filter__value",e)){let s=n;if(!s.value)continue;let r=Number.parseFloat(s.value);if(Number.isNaN(r))continue;let l=s.dataset.type||"",i=R(`.col-filter__op[data-type="${l}"]`,e),o=i?i.value:"",c=Le[l];o&&c&&t.push({attrs:c,op:o,threshold:r})}return t}var sn=new WeakMap;function Qs(e){let t=sn.get(e);return t===void 0&&(t=(e.children[0].textContent||"").toLowerCase(),sn.set(e,t)),t}function rn(e){let t=R("table.file_list",e);if(!t)return;let n=R(".col-filter--name",e),s=n?n.value.trim().toLowerCase():"",r=Ys(e);E("tbody tr.t-file",t).forEach(l=>{let i=l,c=(!s||Qs(l).includes(s))&&r.every(d=>{let p=Number.parseInt(i.dataset[d.attrs.covered]||"0",10)||0,M=Number.parseInt(i.dataset[d.attrs.total]||"0",10)||0,w=M>0?p*100/M:100;return Zs(d.op,w,d.threshold)})?"":"none";i.style.display!==c&&(i.style.display=c)}),re(t),Te(),nn(e),ie()}function Ye(e){let t=Number.parseFloat(e.value),n=e.closest(".col-filter__coverage"),s=n?n.querySelector(".col-filter__op"):null;if(!s)return;let r=s.querySelector('option[value="gt"]'),l=s.querySelector('option[value="lt"]');if(r&&(r.disabled=t>=100),l&&(l.disabled=t<=0),s.selectedOptions[0]&&s.selectedOptions[0].disabled){let i=s.querySelector("option:not(:disabled)");i&&(s.value=i.value)}}function on(){E(".col-filter__value").forEach(e=>Ye(e)),E(".col-filter--name, .col-filter__op, .col-filter__value, .col-filter__coverage").forEach(e=>{e.addEventListener("click",t=>t.stopPropagation())}),F(document,"input",".col-filter--name, .col-filter__op, .col-filter__value",function(){this.classList.contains("col-filter__value")&&Ye(this),rn(this.closest(".file_list_container"))}),F(document,"change",".col-filter__op, .col-filter__value",function(){this.classList.contains("col-filter__value")&&Ye(this),rn(this.closest(".file_list_container"))})}var H=null;function Qe(){return H!==null}function oe(e){H&&H.classList.remove("keyboard-focus"),H=e,H&&(H.classList.add("keyboard-focus"),H.scrollIntoView({block:"nearest"}))}function Je(e){let t=en();if(!t.length)return;if(!H||t.indexOf(H)===-1){oe(e===1?t[0]:t[t.length-1]);return}let n=t.indexOf(H)+e;n>=0&&n<t.length&&oe(t[n])}function ln(){if(!H)return;let e=H.querySelector("a.src_link");e&&(window.location.hash=e.getAttribute("href").substring(1))}var j,Q,et,ge=null,xe="";function tt(){return j.open}function nt(){return Q}function an(){if(!ge)return;xe&&(ge.insertAdjacentHTML("afterbegin",xe),xe="");let e=document.querySelector(".source_files");e&&e.appendChild(ge),ge=null}function Js(e,t){an();let n=jt(e);if(!n)return;let s=n.querySelector(".header");if(s&&(xe=s.outerHTML,et.innerHTML=s.innerHTML,s.remove()),ge=n,Q.appendChild(n),j.open||j.showModal(),document.documentElement.style.overflow="hidden",Q.focus(),t){let r=Q.querySelector('li[data-linenumber="'+t+'"]');r&&(Q.scrollTop=r.offsetTop)}}function cn(e){if(oe(null),Te(),j.open&&(an(),j.close(),Q.innerHTML="",et.innerHTML="",document.documentElement.style.overflow=""),e){let n=document.querySelector(".group_tabs a."+e);if(n){E(".group_tabs li").forEach(r=>r.classList.remove("active")),n.parentElement.classList.add("active"),E(".file_list_container").forEach(r=>r.style.display="none");let s=document.getElementById(e);s&&(s.style.display="")}}let t=document.getElementById("wrapper");t&&!t.classList.contains("hide")&&ie()}function Ce(){let e=window.location.hash.substring(1);if(!e){let t=document.querySelector(".group_tabs a");t&&cn(t.getAttribute("href").replace("#",""));return}if(e.charAt(0)==="_")cn(e.substring(1));else{let t=e.split("-L");if(!document.querySelector(".group_tabs li.active")){let n=document.querySelector(".group_tabs li");n&&n.classList.add("active")}Js(t[0],t[1])}}function Ae(){let e=document.querySelector(".group_tabs li.active a");e&&(window.location.hash=e.getAttribute("href").replace("#","#_"))}function un(){j=document.getElementById("source-dialog"),Q=document.getElementById("source-dialog-body"),et=document.getElementById("source-dialog-title"),j.querySelector(".source-dialog__close").addEventListener("click",Ae),j.addEventListener("click",e=>{e.target===j&&Ae()})}function er(){return E(".source-dialog .source_table li.missed, .source-dialog .source_table li.missed-branch, .source-dialog .source_table li.missed-method")}function st(e){let t=er();if(!t.length)return;let n=nt(),s=n.scrollTop+n.clientHeight/2,r=e===1?t.find(l=>l.offsetTop>s)||t[0]:t.findLast(l=>l.offsetTop<s-10)||t[t.length-1];n.scrollTop=r.offsetTop-n.clientHeight/3}function dn(){F(document,"click",".t-missed-method-toggle",function(e){e.preventDefault();let t=this.closest(".header")||this.closest(".source-dialog__title")||this.closest(".source-dialog__header"),n=t?t.querySelector(".t-missed-method-list"):null;n&&(n.style.display=n.style.display==="none"?"":"none")}),F(document,"click","a.src_link",function(e){e.preventDefault(),window.location.hash=this.getAttribute("href").substring(1)}),F(document,"click","table.file_list tbody tr",function(e){if(e.target.closest("a"))return;let t=this.querySelector("a.src_link");t&&(window.location.hash=t.getAttribute("href").substring(1))}),F(document,"click",".source-dialog .source_table li[data-linenumber]",function(e){e.preventDefault(),nt().scrollTop=this.offsetTop;let t=this.dataset.linenumber,n=window.location.hash.substring(1).replace(/-L.*/,"");window.location.replace(window.location.href.replace(/#.*/,"#"+n+"-L"+t))}),window.addEventListener("hashchange",Ce)}var fn="simplecov-dark-mode";function tr(){try{return localStorage.getItem(fn)}catch(e){return null}}function nr(e){try{localStorage.setItem(fn,e)}catch(t){}}function gn(){let e=document.getElementById("dark-mode-toggle");if(!e)return;let t=document.documentElement;function n(){return t.classList.contains("dark-mode")||!t.classList.contains("light-mode")&&window.matchMedia("(prefers-color-scheme: dark)").matches}function s(){e.textContent=n()?"\u2600\uFE0F Light":"\u{1F319} Dark"}s(),e.addEventListener("click",()=>{let r=n();t.classList.toggle("light-mode",r),t.classList.toggle("dark-mode",!r),nr(r?"light":"dark"),s()}),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{tr()||s()})}function sr(){let e=E(".file_list_container").filter(n=>n.style.display!=="none"),t=e.length?R(".col-filter--name",e[0]):null;t&&t.focus()}function rr(e,t){tt()?(e.preventDefault(),Ae()):t?e.target.blur():Qe()&&oe(null)}function ir(e){e.key==="n"&&!e.shiftKey&&(e.preventDefault(),st(1)),(e.key==="N"||e.key==="n"&&e.shiftKey||e.key==="p")&&(e.preventDefault(),st(-1))}function or(e){e.key==="j"&&(e.preventDefault(),Je(1)),e.key==="k"&&(e.preventDefault(),Je(-1)),e.key==="Enter"&&Qe()&&(e.preventDefault(),ln())}function pn(e){let t=e.target.matches("input, select, textarea");e.key==="/"&&!t?(e.preventDefault(),sr()):e.key==="Escape"?rr(e,t):t||(tt()?ir(e):or(e))}function hn(){let e=1/0;E("abbr.timeago").forEach(t=>{let n=new Date(t.getAttribute("title")||"");Number.isNaN(n.getTime())||(t.textContent=ht(n),e=Math.min(e,mt(n)))}),e<1/0&&setTimeout(hn,e)}function lr(){E(".file_list_container").forEach(e=>e.style.display="none"),E(".file_list_container").forEach(e=>{let t=e.id,n=e.querySelector(".group_name"),s=e.querySelector(".covered_percent"),r=document.createElement("li");r.setAttribute("role","tab");let l=document.createElement("a");l.href="#"+t,l.className=t,l.innerHTML=(n?n.innerHTML:"")+" ("+(s?s.innerHTML:"")+")",r.appendChild(l),document.querySelector(".group_tabs").appendChild(r)}),F(document.querySelector(".group_tabs"),"click","a",function(e){e.preventDefault(),window.location.hash=this.getAttribute("href").replace("#","#_")})}function cr(e){e&&(e.style.transition="opacity 0.3s",e.style.opacity="0",setTimeout(()=>{e.style.display="none"},300));let t=document.getElementById("wrapper");t&&t.classList.remove("hide"),Ze()}function ar(){return J(this,null,function*(){let e=window.SIMPLECOV_DATA,t=document.getElementById("loading");t&&(t.style.display=""),yield Et(Object.keys(e.coverage)),Ut(e),hn(),gn(),Jt(e.meta.primary_coverage),on(),document.addEventListener("keydown",pn),un(),dn(),lr(),window.addEventListener("resize",ie),Ce(),cr(t)})}document.addEventListener("DOMContentLoaded",ar);})();
|
|
Binary file
|
|
Binary file
|
|
Binary file
|