Skip to content

Commit 62ccd10

Browse files
committed
(MAINT) Only require codecov on Ruby >= 2.3.0
Latest version of the codecov gem uses the nil-safe threading operator: codecov/codecov-ruby@b29a9b7
1 parent 831e0af commit 62ccd10

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

spec/spec_helper.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
if ENV['COVERAGE'] == 'yes'
22
require 'simplecov'
33
require 'simplecov-console'
4-
require 'codecov'
54

65
SimpleCov.formatters = [
76
SimpleCov::Formatter::HTMLFormatter,
87
SimpleCov::Formatter::Console,
9-
SimpleCov::Formatter::Codecov,
108
]
9+
10+
unless Gem::Version.new(RUBY_VERSION.dup) < Gem::Version.new('2.3.0')
11+
require 'codecov'
12+
SimpleCov.formatters << SimpleCov::Formatter::Codecov
13+
end
14+
1115
SimpleCov.start do
1216
track_files 'lib/**/*.rb'
1317

0 commit comments

Comments
 (0)