Commit 0794be4 1 parent 62a019f commit 0794be4 Copy full SHA for 0794be4
File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change
1
+ # Enable branch coverage reporting.
2
+ # SimpleCov only supports branch coverage in
3
+ # Ruby >= 2.5.
4
+ SimpleCov . enable_coverage :branch if RUBY_VERSION >= '2.5.0'
5
+
6
+ # Categorize SimpleCov report, for easier reading
1
7
SimpleCov . add_group 'contrib' , '/lib/ddtrace/contrib'
2
8
SimpleCov . add_group 'transport' , '/lib/ddtrace/transport'
3
9
SimpleCov . add_group 'spec' , '/spec/'
Original file line number Diff line number Diff line change @@ -32,7 +32,16 @@ gem 'rspec-collection_matchers', '~> 1.1'
32
32
gem 'rspec_junit_formatter' , '>= 0.4.1'
33
33
gem 'rspec_n' , '~> 1.3' if RUBY_VERSION >= '2.3.0'
34
34
gem 'ruby-prof' , '~> 1.4' if RUBY_PLATFORM != 'java' && RUBY_VERSION >= '2.4.0'
35
- gem 'simplecov' , '~> 0.17'
35
+ if RUBY_VERSION >= '2.5.0'
36
+ # Merging branch coverage results does not work for old, unsupported rubies.
37
+ # We have a fix up for review, https://github.com/simplecov-ruby/simplecov/pull/972,
38
+ # but given it only affects unsupported version of Ruby, it might not get merged.
39
+ gem 'simplecov' , git : 'https://github.com/DataDog/simplecov' , ref : '3bb6b7ee58bf4b1954ca205f50dd44d6f41c57db'
40
+ else
41
+ # Compatible with older rubies. This version still produces compatible output
42
+ # with a newer version when the reports are merged.
43
+ gem 'simplecov' , '~> 0.17'
44
+ end
36
45
gem 'warning' , '~> 1' if RUBY_VERSION >= '2.5.0'
37
46
gem 'webmock' , '>= 3.10.0'
38
47
gem 'webrick' , '>= 1.7.0' if RUBY_VERSION >= '3.0.0' # No longer bundled by default since Ruby 3.0
You can’t perform that action at this time.
0 commit comments