From 199b0b1b8f1c10ff15c9b360b739416b5c37c333 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Mon, 25 Mar 2019 11:16:22 +0000 Subject: [PATCH] (maint) pin rubocop dependencies to work on ruby 2.1 --- Gemfile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 0b31d2f8..922fb4aa 100644 --- a/Gemfile +++ b/Gemfile @@ -12,13 +12,21 @@ group :tests do gem 'license_finder' if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.4.0') gem 'rake', '~> 10.0' gem 'rspec', '~> 3.0' - gem 'rubocop-rspec' # rubocop 0.58 throws when testing against ruby 2.1, so pin to the latest, # unless we're dealing with jruby... if RUBY_PLATFORM == 'java' + # load any rubocop version that works on java for the Rakefile gem 'rubocop' - else + elsif Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.2.0') gem 'rubocop', '0.57.2' + # the last version of parallel to support ruby 2.1 + gem 'parallel', '1.13.0' + gem 'rubocop-rspec' + else + # 2.1-compatible analysis was dropped after version 0.58 + # This needs to be removed once we drop puppet4 support. + gem 'rubocop', '~> 0.57.0' + gem 'rubocop-rspec' end gem 'simplecov-console' # the test gems required for module testing