Skip to content

Commit

Permalink
Use RuboCop 0.64.0
Browse files Browse the repository at this point in the history
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: #2779
  • Loading branch information
dentarg committed Dec 31, 2021
1 parent 963a7e7 commit 6d3a027
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -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"]
Expand Down
25 changes: 1 addition & 24 deletions Rakefile
Expand Up @@ -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"
Expand Down

0 comments on commit 6d3a027

Please sign in to comment.