Puma 6 gemspec - required_ruby_version to Ruby 2.4, RuboCop updates (#2919)

* Puma 6 - required_ruby_version to Ruby 2.4

* Actions - remove Ruby 2.2 & 2.3, add macOS 12

* Update Rubocop, disable Cops as needed to pass
This commit is contained in:
MSP-Greg 2022-08-30 01:13:11 -05:00 committed by GitHub
parent 2615b78172
commit 33ed25bd0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 34 additions and 25 deletions

View File

@ -38,8 +38,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-20.04, ubuntu-18.04, macos-10.15, macos-11, windows-2022 ]
ruby: [ 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, head ]
os: [ ubuntu-20.04, ubuntu-18.04, macos-10.15, macos-11, macos-12, windows-2022 ]
ruby: [ 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, head ]
no-ssl: ['']
yjit: ['']
include:
@ -52,16 +52,16 @@ jobs:
- { os: ubuntu-22.04 , ruby: head }
exclude:
- { os: ubuntu-20.04 , ruby: 2.2 }
- { os: ubuntu-20.04 , ruby: 2.3 }
- { os: windows-2022 , ruby: head }
- { os: macos-10.15 , ruby: 2.6 }
- { os: macos-10.15 , ruby: 2.7 }
- { os: macos-10.15 , ruby: '3.0'}
- { os: macos-10.15 , ruby: 3.1 }
- { os: macos-11 , ruby: 2.2 }
- { os: macos-11 , ruby: 2.3 }
- { os: macos-10.15 , ruby: head }
- { os: macos-11 , ruby: 2.4 }
- { os: macos-11 , ruby: 2.5 }
- { os: macos-12 , ruby: 2.4 }
- { os: macos-12 , ruby: 2.5 }
- { os: macos-12 , ruby: 2.6 }
steps:
- name: repo checkout
@ -73,21 +73,14 @@ jobs:
ruby-version: ${{ matrix.ruby }}
apt-get: ragel
brew: ragel
# below is only needed for Rubies 2.4 and earlier
mingw: openssl ragel
# below is only needed for Ruby 2.4
mingw: openssl
bundler-cache: true
timeout-minutes: 10
# Windows error thrown, doesn't affect CI
- name: update rubygems for Ruby 2.2
if: matrix.ruby < '2.3'
run: gem update --system 2.7.11 --no-document
continue-on-error: true
timeout-minutes: 5
# fixes 'has a bug that prevents `required_ruby_version`'
- name: update rubygems for Ruby 2.3 - 2.5
if: contains('2.3 2.4 2.5', matrix.ruby)
- name: update rubygems for Ruby 2.4 - 2.5
if: contains('2.4 2.5', matrix.ruby)
run: gem update --system 3.3.14 --no-document
continue-on-error: true
timeout-minutes: 5

View File

@ -1,6 +1,8 @@
require: rubocop-performance
AllCops:
DisabledByDefault: true
TargetRubyVersion: 2.2
TargetRubyVersion: 2.4
DisplayCopNames: true
StyleGuideCopsOnly: false
Exclude:
@ -9,6 +11,21 @@ AllCops:
- 'examples/**/*'
- 'pkg/**/*'
- 'Rakefile'
SuggestExtensions: false
NewCops: disable
# ————————————————————————————————————————— disabled cops
Performance/RegexpMatch:
Enabled: false
Performance/UnfreezeString:
Enabled: false
Style/RedundantReturn:
Enabled: false
# ————————————————————————————————————————— enabled cops
Layout/SpaceAfterColon:
Enabled: true
@ -26,10 +43,10 @@ Layout/SpaceBeforeFirstArg:
Layout/SpaceInsideParens:
Enabled: true
Layout/Tab:
Layout/IndentationStyle:
Enabled: true
Layout/TrailingBlankLines:
Layout/TrailingEmptyLines:
Enabled: true
Layout/TrailingWhitespace:
@ -77,5 +94,3 @@ Style/WhileUntilModifier:
Style/TernaryParentheses:
Enabled: true
Style/RedundantReturn:
Enabled: true

View File

@ -16,7 +16,8 @@ gem "sd_notify"
gem "jruby-openssl", :platform => "jruby"
unless ENV['PUMA_NO_RUBOCOP'] || RUBY_PLATFORM.include?('mswin')
gem "rubocop", "~> 0.64.0"
gem "rubocop", "1.12.1"
gem 'rubocop-performance', require: false
end
if %w(2.2.7 2.2.8 2.2.9 2.2.10 2.3.4 2.4.1).include? RUBY_VERSION

View File

@ -28,5 +28,5 @@ Gem::Specification.new do |s|
end
s.license = "BSD-3-Clause"
s.required_ruby_version = Gem::Requirement.new(">= 2.2")
s.required_ruby_version = Gem::Requirement.new(">= 2.4")
end