Skip to content

Commit

Permalink
Fix rake dependency constraints for older Ruby versions
Browse files Browse the repository at this point in the history
  • Loading branch information
floehopper committed Jun 18, 2021
1 parent 670da6d commit 7ce5f29
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions mocha.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,16 @@ Gem::Specification.new do |s| # rubocop:disable Metrics/BlockLength
end
end

if RUBY_VERSION >= '1.9.3'
s.add_development_dependency('rake')
if RUBY_VERSION < '1.9.3'
s.add_development_dependency 'rake', '~> 10.0'
elsif RUBY_VERSION < '2'
s.add_development_dependency 'rake', '~> 12.2.1'
elsif RUBY_VERSION < '2.2'
s.add_development_dependency 'rake', '~> 12.3.3'
else
# Rake >= v11 does not support Ruby < v1.9.3 so use
s.add_development_dependency('rake', '~> 10.0')
s.add_development_dependency 'rake'
end

s.add_development_dependency('introspection', '~> 0.0.1')
if RUBY_VERSION >= '2.2.0'
# No test libraries in standard library
Expand Down

0 comments on commit 7ce5f29

Please sign in to comment.