From 6d3a027572158816ac4e164bd37eda5db63f4220 Mon Sep 17 00:00:00 2001 From: Patrik Ragnarsson Date: Fri, 31 Dec 2021 13:19:53 +0100 Subject: [PATCH] Use RuboCop 0.64.0 Last version we can use while still having Ruby 2.2 support, 0.65.0 drops it: https://github.com/rubocop/rubocop/blob/0c0bee18073201396f679848954235d10b9f8355/CHANGELOG.md#0650-2019-02-19 Fixes issues with RubyGems and Psych: https://github.com/puma/puma/pull/2779 --- Gemfile | 2 +- Rakefile | 25 +------------------------ 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/Gemfile b/Gemfile index 727ee28106..f40b2674ec 100644 --- a/Gemfile +++ b/Gemfile @@ -16,7 +16,7 @@ gem "sd_notify" gem "jruby-openssl", :platform => "jruby" -gem "rubocop", "~> 0.58.0" +gem "rubocop", "~> 0.64.0" if %w(2.2.7 2.2.8 2.2.9 2.2.10 2.3.4 2.4.1).include? RUBY_VERSION gem "stopgap_13632", "~> 1.0", :platforms => ["mri", "mingw", "x64_mingw"] diff --git a/Rakefile b/Rakefile index e932b1a0c9..4ca600c444 100644 --- a/Rakefile +++ b/Rakefile @@ -11,30 +11,7 @@ gemspec = Gem::Specification.load("puma.gemspec") Gem::PackageTask.new(gemspec).define # Add rubocop task -RuboCop::RakeTask.new do - require 'rubocop' - - # Patch RuboCop::ConfigLoader.yaml_safe_load to work with Psych >= 4.0. - module RuboCop - class ConfigLoader - class << self - def yaml_safe_load(yaml_code, filename) - if Gem::Version.new(Psych::VERSION) >= Gem::Version.new('3.1.0') - YAML.safe_load( - yaml_code, - permitted_classes: [Regexp, Symbol], - permitted_symbols: [], - aliases: true, - filename: filename - ) - else - YAML.safe_load(yaml_code, [Regexp, Symbol], [], true, filename) - end - end - end - end - end -end +RuboCop::RakeTask.new # generate extension code using Ragel (C and Java) desc "Generate extension code (C and Java) using Ragel"