From a13015c48d6e55113e75f676fae08628ac352ea5 Mon Sep 17 00:00:00 2001 From: Alexander Fisher Date: Fri, 17 Jan 2020 15:04:05 +0000 Subject: [PATCH] Revert rubocop TargetRubyVersion back to 1.9 Puppet Server 5 isn't fully EOL until Nov 2020. By default it uses jruby 1.7 which is only Ruby 1.9 compatible. Targetting ruby 2.1 already broke one module. See https://github.com/voxpupuli/puppet-firewalld/issues/250 Alternatively, we could tweak the various cops to try to remain compatible. But why? This doesn't provide value over just setting `TargetRubyVersion` to what we need it to be. When puppet 5 goes EOL, we can bump this back up and move to a newer version of rubocop too. Until then, I don't think we're really missing out all that much. --- moduleroot/.rubocop.yml.erb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/moduleroot/.rubocop.yml.erb b/moduleroot/.rubocop.yml.erb index 45f8841d..2e0d03ef 100644 --- a/moduleroot/.rubocop.yml.erb +++ b/moduleroot/.rubocop.yml.erb @@ -1,6 +1,7 @@ require: rubocop-rspec AllCops: - TargetRubyVersion: 2.1 +# Puppet Server 5 defaults to jruby 1.7 so TargetRubyVersion must stay at 1.9 until we drop support for puppet 5 + TargetRubyVersion: 1.9 Include: - ./**/*.rb Exclude: