simplecov 0.22.0 → 1.0.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.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +1058 -508
  4. data/doc/alternate-formatters.md +0 -5
  5. data/doc/commercial-services.md +5 -5
  6. data/exe/simplecov +11 -0
  7. data/lib/minitest/simplecov_plugin.rb +13 -5
  8. data/lib/simplecov/autostart.rb +11 -0
  9. data/lib/simplecov/cli/clean.rb +47 -0
  10. data/lib/simplecov/cli/coverage.rb +91 -0
  11. data/lib/simplecov/cli/diff.rb +151 -0
  12. data/lib/simplecov/cli/dotfile.rb +100 -0
  13. data/lib/simplecov/cli/merge.rb +116 -0
  14. data/lib/simplecov/cli/open.rb +50 -0
  15. data/lib/simplecov/cli/report.rb +84 -0
  16. data/lib/simplecov/cli/run.rb +36 -0
  17. data/lib/simplecov/cli/serve.rb +139 -0
  18. data/lib/simplecov/cli/uncovered.rb +107 -0
  19. data/lib/simplecov/cli.rb +150 -0
  20. data/lib/simplecov/color.rb +74 -0
  21. data/lib/simplecov/combine/branches_combiner.rb +27 -5
  22. data/lib/simplecov/combine/files_combiner.rb +7 -1
  23. data/lib/simplecov/combine/lines_combiner.rb +19 -17
  24. data/lib/simplecov/combine/methods_combiner.rb +26 -0
  25. data/lib/simplecov/combine/results_combiner.rb +5 -4
  26. data/lib/simplecov/command_guesser.rb +46 -32
  27. data/lib/simplecov/configuration/coverage.rb +171 -0
  28. data/lib/simplecov/configuration/coverage_criteria.rb +156 -0
  29. data/lib/simplecov/configuration/filters.rb +197 -0
  30. data/lib/simplecov/configuration/formatting.rb +119 -0
  31. data/lib/simplecov/configuration/ignored_entries.rb +63 -0
  32. data/lib/simplecov/configuration/merging.rb +164 -0
  33. data/lib/simplecov/configuration/thresholds.rb +174 -0
  34. data/lib/simplecov/configuration.rb +91 -407
  35. data/lib/simplecov/coverage_statistics.rb +12 -9
  36. data/lib/simplecov/coverage_violations.rb +148 -0
  37. data/lib/simplecov/defaults.rb +27 -20
  38. data/lib/simplecov/deprecation.rb +45 -0
  39. data/lib/simplecov/directive.rb +162 -0
  40. data/lib/simplecov/exit_codes/exit_code_handling.rb +8 -2
  41. data/lib/simplecov/exit_codes/maximum_coverage_drop_check.rb +19 -57
  42. data/lib/simplecov/exit_codes/maximum_overall_coverage_check.rb +45 -0
  43. data/lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb +17 -27
  44. data/lib/simplecov/exit_codes/minimum_coverage_by_group_check.rb +41 -0
  45. data/lib/simplecov/exit_codes/minimum_overall_coverage_check.rb +38 -21
  46. data/lib/simplecov/exit_codes.rb +3 -0
  47. data/lib/simplecov/exit_handling.rb +158 -0
  48. data/lib/simplecov/file_list.rb +61 -17
  49. data/lib/simplecov/filter.rb +69 -24
  50. data/lib/simplecov/formatter/base.rb +101 -0
  51. data/lib/simplecov/formatter/html_formatter/public/application.css +1 -0
  52. data/lib/simplecov/formatter/html_formatter/public/application.js +18 -0
  53. data/lib/simplecov/formatter/html_formatter/public/favicon_green.png +0 -0
  54. data/lib/simplecov/formatter/html_formatter/public/favicon_red.png +0 -0
  55. data/lib/simplecov/formatter/html_formatter/public/favicon_yellow.png +0 -0
  56. data/lib/simplecov/formatter/html_formatter/public/index.html +56 -0
  57. data/lib/simplecov/formatter/html_formatter.rb +79 -0
  58. data/lib/simplecov/formatter/json_formatter/errors_formatter.rb +84 -0
  59. data/lib/simplecov/formatter/json_formatter/result_hash_formatter.rb +128 -0
  60. data/lib/simplecov/formatter/json_formatter/source_file_formatter.rb +99 -0
  61. data/lib/simplecov/formatter/json_formatter.rb +87 -0
  62. data/lib/simplecov/formatter/multi_formatter.rb +4 -5
  63. data/lib/simplecov/formatter/simple_formatter.rb +9 -11
  64. data/lib/simplecov/formatter.rb +4 -0
  65. data/lib/simplecov/last_run.rb +10 -3
  66. data/lib/simplecov/lines_classifier.rb +25 -13
  67. data/lib/simplecov/load_global_config.rb +9 -4
  68. data/lib/simplecov/parallel_adapters/base.rb +61 -0
  69. data/lib/simplecov/parallel_adapters/generic.rb +44 -0
  70. data/lib/simplecov/parallel_adapters/parallel_tests.rb +93 -0
  71. data/lib/simplecov/parallel_adapters.rb +83 -0
  72. data/lib/simplecov/parallel_coordination.rb +129 -0
  73. data/lib/simplecov/process.rb +31 -13
  74. data/lib/simplecov/profiles/bundler_filter.rb +1 -1
  75. data/lib/simplecov/profiles/hidden_filter.rb +1 -1
  76. data/lib/simplecov/profiles/rails.rb +24 -10
  77. data/lib/simplecov/profiles/root_filter.rb +6 -5
  78. data/lib/simplecov/profiles/strict.rb +32 -0
  79. data/lib/simplecov/profiles/test_frameworks.rb +1 -4
  80. data/lib/simplecov/profiles.rb +32 -3
  81. data/lib/simplecov/result/missing_source_files_reporter.rb +49 -0
  82. data/lib/simplecov/result/source_file_builder.rb +51 -0
  83. data/lib/simplecov/result.rb +108 -19
  84. data/lib/simplecov/result_adapter.rb +70 -8
  85. data/lib/simplecov/result_merger/legacy_format_adapter.rb +28 -0
  86. data/lib/simplecov/result_merger/resultset_file.rb +38 -0
  87. data/lib/simplecov/result_merger/resultset_store.rb +50 -0
  88. data/lib/simplecov/result_merger.rb +59 -91
  89. data/lib/simplecov/result_processing.rb +179 -0
  90. data/lib/simplecov/simulate_coverage.rb +54 -8
  91. data/lib/simplecov/source_file/branch.rb +1 -3
  92. data/lib/simplecov/source_file/branch_builder.rb +114 -0
  93. data/lib/simplecov/source_file/builder_context.rb +28 -0
  94. data/lib/simplecov/source_file/line.rb +7 -2
  95. data/lib/simplecov/source_file/line_builder.rb +43 -0
  96. data/lib/simplecov/source_file/method.rb +52 -0
  97. data/lib/simplecov/source_file/method_builder.rb +58 -0
  98. data/lib/simplecov/source_file/ruby_data_parser.rb +88 -0
  99. data/lib/simplecov/source_file/skip_chunks.rb +75 -0
  100. data/lib/simplecov/source_file/source_loader.rb +63 -0
  101. data/lib/simplecov/source_file/statistics.rb +57 -0
  102. data/lib/simplecov/source_file.rb +66 -232
  103. data/lib/simplecov/static_coverage_extractor/method_collector.rb +55 -0
  104. data/lib/simplecov/static_coverage_extractor/visitor.rb +171 -0
  105. data/lib/simplecov/static_coverage_extractor.rb +110 -0
  106. data/lib/simplecov/useless_results_remover.rb +16 -7
  107. data/lib/simplecov/version.rb +1 -1
  108. data/lib/simplecov-html.rb +4 -0
  109. data/lib/simplecov.rb +156 -371
  110. data/lib/simplecov_json_formatter.rb +4 -0
  111. data/schemas/coverage-v1.0.schema.json +306 -0
  112. data/schemas/coverage.schema.json +306 -0
  113. metadata +90 -57
  114. data/CHANGELOG.md +0 -191
  115. data/lib/simplecov/default_formatter.rb +0 -20
metadata CHANGED
@@ -1,125 +1,159 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simplecov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Erik Berlin
8
+ - Benjamin Fleischer
9
+ - Akira Matsuda
7
10
  - Christoph Olszowka
8
11
  - Tobias Pfeiffer
9
- autorequire:
10
- bindir: bin
12
+ - David Rodríguez
13
+ - Xavier Shay
14
+ bindir: exe
11
15
  cert_chain: []
12
- date: 2022-12-23 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: docile
16
- requirement: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - "~>"
19
- - !ruby/object:Gem::Version
20
- version: '1.1'
21
- type: :runtime
22
- prerelease: false
23
- version_requirements: !ruby/object:Gem::Requirement
24
- requirements:
25
- - - "~>"
26
- - !ruby/object:Gem::Version
27
- version: '1.1'
28
- - !ruby/object:Gem::Dependency
29
- name: simplecov-html
30
- requirement: !ruby/object:Gem::Requirement
31
- requirements:
32
- - - "~>"
33
- - !ruby/object:Gem::Version
34
- version: '0.11'
35
- type: :runtime
36
- prerelease: false
37
- version_requirements: !ruby/object:Gem::Requirement
38
- requirements:
39
- - - "~>"
40
- - !ruby/object:Gem::Version
41
- version: '0.11'
42
- - !ruby/object:Gem::Dependency
43
- name: simplecov_json_formatter
44
- requirement: !ruby/object:Gem::Requirement
45
- requirements:
46
- - - "~>"
47
- - !ruby/object:Gem::Version
48
- version: '0.1'
49
- type: :runtime
50
- prerelease: false
51
- version_requirements: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - "~>"
54
- - !ruby/object:Gem::Version
55
- version: '0.1'
16
+ date: 1980-01-02 00:00:00.000000000 Z
17
+ dependencies: []
56
18
  description: Code coverage for Ruby with a powerful configuration library and automatic
57
19
  merging of coverage across test suites
58
20
  email:
59
- - christoph at olszowka de
21
+ - sferik@gmail.com
22
+ - github@benjaminfleischer.com
23
+ - ronnie@dio.jp
24
+ - christoph@olszowka.de
60
25
  - pragtob@gmail.com
61
- executables: []
26
+ - deivid.rodriguez@gmail.com
27
+ - xavier@rhnh.net
28
+ executables:
29
+ - simplecov
62
30
  extensions: []
63
31
  extra_rdoc_files: []
64
32
  files:
65
- - CHANGELOG.md
66
33
  - LICENSE
67
34
  - README.md
68
35
  - doc/alternate-formatters.md
69
36
  - doc/commercial-services.md
70
37
  - doc/editor-integration.md
38
+ - exe/simplecov
71
39
  - lib/minitest/simplecov_plugin.rb
40
+ - lib/simplecov-html.rb
72
41
  - lib/simplecov.rb
42
+ - lib/simplecov/autostart.rb
43
+ - lib/simplecov/cli.rb
44
+ - lib/simplecov/cli/clean.rb
45
+ - lib/simplecov/cli/coverage.rb
46
+ - lib/simplecov/cli/diff.rb
47
+ - lib/simplecov/cli/dotfile.rb
48
+ - lib/simplecov/cli/merge.rb
49
+ - lib/simplecov/cli/open.rb
50
+ - lib/simplecov/cli/report.rb
51
+ - lib/simplecov/cli/run.rb
52
+ - lib/simplecov/cli/serve.rb
53
+ - lib/simplecov/cli/uncovered.rb
54
+ - lib/simplecov/color.rb
73
55
  - lib/simplecov/combine.rb
74
56
  - lib/simplecov/combine/branches_combiner.rb
75
57
  - lib/simplecov/combine/files_combiner.rb
76
58
  - lib/simplecov/combine/lines_combiner.rb
59
+ - lib/simplecov/combine/methods_combiner.rb
77
60
  - lib/simplecov/combine/results_combiner.rb
78
61
  - lib/simplecov/command_guesser.rb
79
62
  - lib/simplecov/configuration.rb
63
+ - lib/simplecov/configuration/coverage.rb
64
+ - lib/simplecov/configuration/coverage_criteria.rb
65
+ - lib/simplecov/configuration/filters.rb
66
+ - lib/simplecov/configuration/formatting.rb
67
+ - lib/simplecov/configuration/ignored_entries.rb
68
+ - lib/simplecov/configuration/merging.rb
69
+ - lib/simplecov/configuration/thresholds.rb
80
70
  - lib/simplecov/coverage_statistics.rb
81
- - lib/simplecov/default_formatter.rb
71
+ - lib/simplecov/coverage_violations.rb
82
72
  - lib/simplecov/defaults.rb
73
+ - lib/simplecov/deprecation.rb
74
+ - lib/simplecov/directive.rb
83
75
  - lib/simplecov/exit_codes.rb
84
76
  - lib/simplecov/exit_codes/exit_code_handling.rb
85
77
  - lib/simplecov/exit_codes/maximum_coverage_drop_check.rb
78
+ - lib/simplecov/exit_codes/maximum_overall_coverage_check.rb
86
79
  - lib/simplecov/exit_codes/minimum_coverage_by_file_check.rb
80
+ - lib/simplecov/exit_codes/minimum_coverage_by_group_check.rb
87
81
  - lib/simplecov/exit_codes/minimum_overall_coverage_check.rb
82
+ - lib/simplecov/exit_handling.rb
88
83
  - lib/simplecov/file_list.rb
89
84
  - lib/simplecov/filter.rb
90
85
  - lib/simplecov/formatter.rb
86
+ - lib/simplecov/formatter/base.rb
87
+ - 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
+ - lib/simplecov/formatter/html_formatter/public/index.html
94
+ - lib/simplecov/formatter/json_formatter.rb
95
+ - lib/simplecov/formatter/json_formatter/errors_formatter.rb
96
+ - lib/simplecov/formatter/json_formatter/result_hash_formatter.rb
97
+ - lib/simplecov/formatter/json_formatter/source_file_formatter.rb
91
98
  - lib/simplecov/formatter/multi_formatter.rb
92
99
  - lib/simplecov/formatter/simple_formatter.rb
93
100
  - lib/simplecov/last_run.rb
94
101
  - lib/simplecov/lines_classifier.rb
95
102
  - lib/simplecov/load_global_config.rb
96
103
  - lib/simplecov/no_defaults.rb
104
+ - lib/simplecov/parallel_adapters.rb
105
+ - lib/simplecov/parallel_adapters/base.rb
106
+ - lib/simplecov/parallel_adapters/generic.rb
107
+ - lib/simplecov/parallel_adapters/parallel_tests.rb
108
+ - lib/simplecov/parallel_coordination.rb
97
109
  - lib/simplecov/process.rb
98
110
  - lib/simplecov/profiles.rb
99
111
  - lib/simplecov/profiles/bundler_filter.rb
100
112
  - lib/simplecov/profiles/hidden_filter.rb
101
113
  - lib/simplecov/profiles/rails.rb
102
114
  - lib/simplecov/profiles/root_filter.rb
115
+ - lib/simplecov/profiles/strict.rb
103
116
  - lib/simplecov/profiles/test_frameworks.rb
104
117
  - lib/simplecov/result.rb
118
+ - lib/simplecov/result/missing_source_files_reporter.rb
119
+ - lib/simplecov/result/source_file_builder.rb
105
120
  - lib/simplecov/result_adapter.rb
106
121
  - lib/simplecov/result_merger.rb
122
+ - lib/simplecov/result_merger/legacy_format_adapter.rb
123
+ - lib/simplecov/result_merger/resultset_file.rb
124
+ - lib/simplecov/result_merger/resultset_store.rb
125
+ - lib/simplecov/result_processing.rb
107
126
  - lib/simplecov/simulate_coverage.rb
108
127
  - lib/simplecov/source_file.rb
109
128
  - lib/simplecov/source_file/branch.rb
129
+ - lib/simplecov/source_file/branch_builder.rb
130
+ - lib/simplecov/source_file/builder_context.rb
110
131
  - lib/simplecov/source_file/line.rb
132
+ - lib/simplecov/source_file/line_builder.rb
133
+ - lib/simplecov/source_file/method.rb
134
+ - lib/simplecov/source_file/method_builder.rb
135
+ - lib/simplecov/source_file/ruby_data_parser.rb
136
+ - lib/simplecov/source_file/skip_chunks.rb
137
+ - lib/simplecov/source_file/source_loader.rb
138
+ - lib/simplecov/source_file/statistics.rb
139
+ - lib/simplecov/static_coverage_extractor.rb
140
+ - lib/simplecov/static_coverage_extractor/method_collector.rb
141
+ - lib/simplecov/static_coverage_extractor/visitor.rb
111
142
  - lib/simplecov/useless_results_remover.rb
112
143
  - lib/simplecov/version.rb
144
+ - lib/simplecov_json_formatter.rb
145
+ - schemas/coverage-v1.0.schema.json
146
+ - schemas/coverage.schema.json
113
147
  homepage: https://github.com/simplecov-ruby/simplecov
114
148
  licenses:
115
149
  - MIT
116
150
  metadata:
117
151
  bug_tracker_uri: https://github.com/simplecov-ruby/simplecov/issues
118
152
  changelog_uri: https://github.com/simplecov-ruby/simplecov/blob/main/CHANGELOG.md
119
- documentation_uri: https://www.rubydoc.info/gems/simplecov/0.22.0
153
+ documentation_uri: https://www.rubydoc.info/gems/simplecov/1.0.0
120
154
  mailing_list_uri: https://groups.google.com/forum/#!forum/simplecov
121
- source_code_uri: https://github.com/simplecov-ruby/simplecov/tree/v0.22.0
122
- post_install_message:
155
+ source_code_uri: https://github.com/simplecov-ruby/simplecov/tree/v1.0.0
156
+ rubygems_mfa_required: 'true'
123
157
  rdoc_options: []
124
158
  require_paths:
125
159
  - lib
@@ -127,15 +161,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
127
161
  requirements:
128
162
  - - ">="
129
163
  - !ruby/object:Gem::Version
130
- version: 2.5.0
164
+ version: '3.2'
131
165
  required_rubygems_version: !ruby/object:Gem::Requirement
132
166
  requirements:
133
167
  - - ">="
134
168
  - !ruby/object:Gem::Version
135
169
  version: '0'
136
170
  requirements: []
137
- rubygems_version: 3.3.7
138
- signing_key:
171
+ rubygems_version: 4.0.16
139
172
  specification_version: 4
140
173
  summary: Code coverage for Ruby
141
174
  test_files: []
data/CHANGELOG.md DELETED
@@ -1,191 +0,0 @@
1
- 0.22.0 (2022-12-23)
2
- ==========
3
-
4
- ## Enhancements
5
-
6
- * On Ruby 3.2+, you can now use the new Coverage library feature for `eval` - See https://github.com/simplecov-ruby/simplecov/pull/1037. Thanks [@mame](https://github.com/mame)!
7
-
8
- ## Bugfixes
9
- * Fix for making the test suite pass against the upcoming Ruby 3.2 - See https://github.com/simplecov-ruby/simplecov/pull/1035. Thanks [@mame](https://github.com/mame)
10
-
11
- 0.21.2 (2021-01-09)
12
- ==========
13
-
14
- ## Bugfixes
15
- * `maximum_coverage_drop` won't fail any more if `.last_run.json` is still in the old format. Thanks [@petertellgren](https://github.com/petertellgren)
16
- * `maximum_coverage_drop` won't fail if an expectation is specified for a previous unrecorded criterion, it will just pass (there's nothing, so nothing to drop)
17
- * fixed bug in `maximum_coverage_drop` calculation that could falsely report it had dropped for minimal differences
18
-
19
- 0.21.1 (2021-01-04)
20
- ==========
21
-
22
- ## Bugfixes
23
- * `minimum_coverage_by_file` works again as expected (errored out before 😱)
24
-
25
- 0.21.0 (2021-01-03)
26
- ==========
27
-
28
- The "Collate++" release making it more viable for big CI setups by limiting memory consumption. Also includes some nice new additions for branch coverage settings.
29
-
30
- ## Enhancements
31
- * Performance of `SimpleCov.collate` improved - it should both run faster and consume much less memory esp. when run with many files (memory consumption should not increase with number of files any more)
32
- * Can now define the minimum_coverage_by_file, maximum_coverage_drop and refuse_coverage_drop by branch as well as line coverage. Thanks to [@jemmaissroff](https://github.com/jemmaissroff)
33
- * Can set primary coverage to something other than line by setting `primary_coverage :branch` in SimpleCov Configuration. Thanks to [@jemmaissroff](https://github.com/jemmaissroff)
34
-
35
- ## Misc
36
- * reduce gem size by splitting Changelog into `Changelog.md` and a pre 0.18 `Changelog.old.md`, the latter of which is not included in the gem
37
- * The interface of `ResultMeger.merge_and_store` is changed to support the `collate` performance improvements mentioned above. It's not considered an official API, hence this is not in the breaking section. For people using it to merge results from different machines, it's recommended to migrate to [collate](https://github.com/simplecov-ruby/simplecov#merging-test-runs-under-different-execution-environments).
38
-
39
- 0.20.0 (2020-11-29)
40
- ==========
41
-
42
- The "JSON formatter" release. Starting now a JSON formatter is included by default in the release. This is mostly done for Code Climate reasons, you can find more details [in this issue](https://github.com/codeclimate/test-reporter/issues/413).
43
- Shipping with so much by default is sub-optimal, we know. It's the long term plan to also provide `simplecov-core` without the HTML or JSON formatters for those who don't need them/for other formatters to rely on.
44
-
45
- ## Enhancements
46
- * `simplecov_json_formatter` included by default ([docs](https://github.com/simplecov-ruby/simplecov#json-formatter)), this should enable the Code Climate test reporter to work again once it's updated
47
- * invalidate internal cache after switching `SimpleCov.root`, should help with some bugs
48
-
49
- 0.19.1 (2020-10-25)
50
- ==========
51
-
52
- ## Bugfixes
53
-
54
- * No more warnings triggered by `enable_for_subprocesses`. Thanks to [@mame](https://github.com/mame)
55
- * Avoid trying to patch `Process.fork` when it isn't available. Thanks to [@MSP-Greg](https://github.com/MSP-Greg)
56
-
57
- 0.19.0 (2020-08-16)
58
- ==========
59
-
60
- ## Breaking Changes
61
- * Dropped support for Ruby 2.4, it reached EOL
62
-
63
- ## Enhancements
64
- * observe forked processes (enable with SimpleCov.enable_for_subprocesses). See [#881](https://github.com/simplecov-ruby/simplecov/pull/881), thanks to [@robotdana](https://github.com/robotdana)
65
- * SimpleCov distinguishes better that it stopped processing because of a previous error vs. SimpleCov is the originator of said error due to coverage requirements.
66
-
67
- ## Bugfixes
68
- * Changing the `SimpleCov.root` combined with the root filtering didn't work. Now they do! Thanks to [@deivid-rodriguez](https://github.com/deivid-rodriguez) and see [#894](https://github.com/simplecov-ruby/simplecov/pull/894)
69
- * in parallel test execution it could happen that the last coverage result was written to disk when it didn't complete yet, changed to only write it once it's the final result
70
- * if you run parallel tests only the final process will report violations of the configured test coverage, not all previous processes
71
- * changed the parallel_tests merging mechanisms to do the waiting always in the last process, should reduce race conditions
72
-
73
- ## Noteworthy
74
- * The repo has moved to https://github.com/simplecov-ruby/simplecov - everything stays the same, redirects should work but you might wanna update anyhow
75
- * The primary development branch is now `main`, not `master` anymore. If you get simplecov directly from github change your reference. For a while `master` will still be occasionally updated but that's no long term solion.
76
-
77
- 0.18.5 (2020-02-25)
78
- ===================
79
-
80
- Can you guess? Another bugfix release!
81
-
82
- ## Bugfixes
83
- * minitest won't crash if SimpleCov isn't loaded - aka don't execute SimpleCov code in the minitest plugin if SimpleCov isn't loaded. Thanks to [@edariedl](https://github.com/edariedl) for the report of the peculiar problem in [#877](https://github.com/simplecov-ruby/simplecov/issues/877).
84
-
85
- 0.18.4 (2020-02-24)
86
- ===================
87
-
88
- Another small bugfix release 🙈 Fixes SimpleCov running with rspec-rails, which was broken due to our fixed minitest integration.
89
-
90
- ## Bugfixes
91
- * SimpleCov will run again correctly when used with rspec-rails. The excellent bug report [#873](https://github.com/simplecov-ruby/simplecov/issues/873) by [@odlp](https://github.com/odlp) perfectly details what went wrong. Thanks to [@adam12](https://github.com/adam12) for the fix [#874](https://github.com/simplecov-ruby/simplecov/pull/874).
92
-
93
-
94
- 0.18.3 (2020-02-23)
95
- ===========
96
-
97
- Small bugfix release. It's especially recommended to upgrade simplecov-html as well because of bugs in the 0.12.0 release.
98
-
99
- ## Bugfixes
100
- * Fix a regression related to file encodings as special characters were missing. Furthermore we now respect the magic `# encoding: ...` comment and read files in the right encoding. Thanks ([@Tietew](https://github.com/Tietew)) - see [#866](https://github.com/simplecov-ruby/simplecov/pull/866)
101
- * Use `Minitest.after_run` hook to trigger post-run hooks if `Minitest` is present. See [#756](https://github.com/simplecov-ruby/simplecov/pull/756) and [#855](https://github.com/simplecov-ruby/simplecov/pull/855) thanks ([@adam12](https://github.com/adam12))
102
-
103
- 0.18.2 (2020-02-12)
104
- ===================
105
-
106
- Small release just to allow you to use the new simplecov-html.
107
-
108
- ## Enhancements
109
- * Relax simplecov-html requirement so that you're able to use [0.12.0](https://github.com/simplecov-ruby/simplecov-html/blob/main/CHANGELOG.md#0120-2020-02-12)
110
-
111
- 0.18.1 (2020-01-31)
112
- ===================
113
-
114
- Small Bugfix release.
115
-
116
- ## Bugfixes
117
- * Just putting `# :nocov:` on top of a file or having an uneven number of them in general works again and acts as if ignoring until the end of the file. See [#846](https://github.com/simplecov-ruby/simplecov/issues/846) and thanks [@DannyBen](https://github.com/DannyBen) for the report.
118
-
119
- 0.18.0 (2020-01-28)
120
- ===================
121
-
122
- Huge release! Highlights are support for branch coverage (Ruby 2.5+) and dropping support for EOL'ed Ruby versions (< 2.4).
123
- Please also read the other beta patch notes.
124
-
125
- You can run with branch coverage by putting `enable_coverage :branch` into your SimpleCov configuration (like the `SimpleCov.start do .. end` block)
126
-
127
- ## Enhancements
128
- * You can now define the minimum expected coverage by criterion like `minimum_coverage line: 90, branch: 80`
129
- * Memoized some internal data structures that didn't change to reduce SimpleCov overhead
130
- * Both `FileList` and `SourceFile` now have a `coverage` method that returns a hash that points from a coverage criterion to a `CoverageStatistics` object for uniform access to overall coverage statistics for both line and branch coverage
131
-
132
- ## Bugfixes
133
- * we were losing precision by rounding the covered strength early, that has been removed. **For Formatters** this also means that you may need to round it yourself now.
134
- * Removed an inconsistency in how we treat skipped vs. irrelevant lines (see [#565](https://github.com/simplecov-ruby/simplecov/issues/565)) - SimpleCov's definition of 100% is now "You covered everything that you could" so if coverage is 0/0 that's counted as a 100% no matter if the lines were irrelevant or ignored/skipped
135
-
136
- ## Noteworthy
137
- * `FileList` stopped inheriting from Array, it includes Enumerable so if you didn't use Array specific methods on it in formatters you should be fine
138
- * We needed to change an internal file format, which we use for merging across processes, to accommodate branch coverage. Sadly CodeClimate chose to use this file to report test coverage. Until a resolution is found the code climate test reporter won't work with SimpleCov for 0.18+, see [this issue on the test reporter](https://github.com/codeclimate/test-reporter/issues/413).
139
-
140
- 0.18.0.beta3 (2020-01-20)
141
- ========================
142
-
143
- ## Enhancements
144
- * Instead of ignoring old `.resultset.json`s that are inside the merge timeout, adapt and respect them
145
-
146
- ## Bugfixes
147
- * Remove the constant warning printing if you still have a `.resultset.json` in pre 0.18 layout that is within your merge timeout
148
-
149
- 0.18.0.beta2 (2020-01-19)
150
- ===================
151
-
152
- ## Enhancements
153
- * only turn on the requested coverage criteria (when activating branch coverage before SimpleCov would also instruct Ruby to take Method coverage)
154
- * Change how branch coverage is displayed, now it's `branch_type: hit_count` which should be more self explanatory. See [#830](https://github.com/simplecov-ruby/simplecov/pull/830) for an example and feel free to give feedback!
155
- * Allow early running exit tasks and avoid the `at_exit` hook through the `SimpleCov.run_exit_tasks!` method. (thanks [@macumber](https://github.com/macumber))
156
- * Allow manual collation of result sets through the `SimpleCov.collate` entrypoint. See the README for more details (thanks [@ticky](https://github.com/ticky))
157
- * Within `case`, even if there is no `else` branch declared show missing coverage for it (aka no branch of it). See [#825](https://github.com/simplecov-ruby/simplecov/pull/825)
158
- * Stop symbolizing all keys when loading cache (should lead to be faster and consume less memory)
159
- * Cache whether we can use/are using branch coverage (should be slightly faster)
160
-
161
- ## Bugfixes
162
- * Fix a crash that happened when an old version of our internal cache file `.resultset.json` was still present
163
-
164
- 0.18.0.beta1 (2020-01-05)
165
- ===================
166
-
167
- This is a huge release highlighted by changing our support for ruby versions to 2.4+ (so things that aren't EOL'ed) and finally adding branch coverage support!
168
-
169
- This release is still beta because we'd love for you to test out branch coverage and get your feedback before doing a full release.
170
-
171
- On a personal note from [@PragTob](https://github.com/PragTob/) thanks to [ruby together](https://rubytogether.org/) for sponsoring this work on SimpleCov making it possible to deliver this and subsequent releases.
172
-
173
- ## Breaking
174
- * Dropped support for all EOL'ed rubies meaning we only support 2.4+. Simplecov can no longer be installed on older rubies, but older simplecov releases should still work. (thanks [@deivid-rodriguez](https://github.com/deivid-rodriguez))
175
- * Dropped the `rake simplecov` task that "magically" integreated with rails. It was always undocumented, caused some issues and [had some issues](https://github.com/simplecov-ruby/simplecov/issues/689#issuecomment-561572327). Use the integration as described in the README please :)
176
-
177
- ## Enhancements
178
-
179
- * Branch coverage is here! Please try it out and test it! You can activate it with `enable_coverage :branch`. See the README for more details. This is thanks to a bunch of people most notably [@som4ik](https://github.com/som4ik), [@tycooon](https://github.com/tycooon), [@stepozer](https://github.com/stepozer), [@klyonrad](https://github.com/klyonrad) and your humble maintainers also contributed ;)
180
- * If the minimum coverage is set to be greater than 100, a warning will be shown. See [#737](https://github.com/simplecov-ruby/simplecov/pull/737) (thanks [@belfazt](https://github.com/belfazt))
181
- * Add a configuration option to disable the printing of non-successful exit statuses. See [#747](https://github.com/simplecov-ruby/simplecov/pull/746) (thanks [@JacobEvelyn](https://github.com/JacobEvelyn))
182
- * Calculating 100% coverage is now stricter, so 100% means 100%. See [#680](https://github.com/simplecov-ruby/simplecov/pull/680) thanks [@gleseur](https://github.com/gleseur)
183
-
184
- ## Bugfixes
185
-
186
- * Add new instance of `Minitest` constant. The `MiniTest` constant (with the capital T) will be removed in the next major release of Minitest. See [#757](https://github.com/simplecov-ruby/simplecov/pull/757) (thanks [@adam12](https://github.com/adam12))
187
-
188
- Older Changelogs
189
- ================
190
-
191
- Looking for older changelogs? Please check the [old Changelog](https://github.com/simplecov-ruby/simplecov/blob/main/CHANGELOG.old.md)
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "simplecov-html"
4
- module SimpleCov
5
- module Formatter
6
- class << self
7
- def from_env(env)
8
- formatters = [SimpleCov::Formatter::HTMLFormatter]
9
-
10
- # When running under a CI that uses CodeClimate, JSON output is expected
11
- if env.fetch("CC_TEST_REPORTER_ID", nil)
12
- require "simplecov_json_formatter"
13
- formatters.push(SimpleCov::Formatter::JSONFormatter)
14
- end
15
-
16
- formatters
17
- end
18
- end
19
- end
20
- end