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:
parent
2615b78172
commit
33ed25bd0e
|
@ -38,8 +38,8 @@ jobs:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-20.04, ubuntu-18.04, macos-10.15, macos-11, windows-2022 ]
|
os: [ ubuntu-20.04, ubuntu-18.04, macos-10.15, macos-11, macos-12, windows-2022 ]
|
||||||
ruby: [ 2.2, 2.3, 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, head ]
|
ruby: [ 2.4, 2.5, 2.6, 2.7, '3.0', 3.1, head ]
|
||||||
no-ssl: ['']
|
no-ssl: ['']
|
||||||
yjit: ['']
|
yjit: ['']
|
||||||
include:
|
include:
|
||||||
|
@ -52,16 +52,16 @@ jobs:
|
||||||
- { os: ubuntu-22.04 , ruby: head }
|
- { os: ubuntu-22.04 , ruby: head }
|
||||||
|
|
||||||
exclude:
|
exclude:
|
||||||
- { os: ubuntu-20.04 , ruby: 2.2 }
|
|
||||||
- { os: ubuntu-20.04 , ruby: 2.3 }
|
|
||||||
- { os: windows-2022 , ruby: head }
|
- { os: windows-2022 , ruby: head }
|
||||||
- { os: macos-10.15 , ruby: 2.6 }
|
|
||||||
- { os: macos-10.15 , ruby: 2.7 }
|
- { os: macos-10.15 , ruby: 2.7 }
|
||||||
- { os: macos-10.15 , ruby: '3.0'}
|
- { os: macos-10.15 , ruby: '3.0'}
|
||||||
- { os: macos-10.15 , ruby: 3.1 }
|
- { os: macos-10.15 , ruby: 3.1 }
|
||||||
- { os: macos-11 , ruby: 2.2 }
|
- { os: macos-10.15 , ruby: head }
|
||||||
- { os: macos-11 , ruby: 2.3 }
|
|
||||||
- { os: macos-11 , ruby: 2.4 }
|
- { 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:
|
steps:
|
||||||
- name: repo checkout
|
- name: repo checkout
|
||||||
|
@ -73,21 +73,14 @@ jobs:
|
||||||
ruby-version: ${{ matrix.ruby }}
|
ruby-version: ${{ matrix.ruby }}
|
||||||
apt-get: ragel
|
apt-get: ragel
|
||||||
brew: ragel
|
brew: ragel
|
||||||
# below is only needed for Rubies 2.4 and earlier
|
# below is only needed for Ruby 2.4
|
||||||
mingw: openssl ragel
|
mingw: openssl
|
||||||
bundler-cache: true
|
bundler-cache: true
|
||||||
timeout-minutes: 10
|
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`'
|
# fixes 'has a bug that prevents `required_ruby_version`'
|
||||||
- name: update rubygems for Ruby 2.3 - 2.5
|
- name: update rubygems for Ruby 2.4 - 2.5
|
||||||
if: contains('2.3 2.4 2.5', matrix.ruby)
|
if: contains('2.4 2.5', matrix.ruby)
|
||||||
run: gem update --system 3.3.14 --no-document
|
run: gem update --system 3.3.14 --no-document
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
|
|
25
.rubocop.yml
25
.rubocop.yml
|
@ -1,6 +1,8 @@
|
||||||
|
require: rubocop-performance
|
||||||
|
|
||||||
AllCops:
|
AllCops:
|
||||||
DisabledByDefault: true
|
DisabledByDefault: true
|
||||||
TargetRubyVersion: 2.2
|
TargetRubyVersion: 2.4
|
||||||
DisplayCopNames: true
|
DisplayCopNames: true
|
||||||
StyleGuideCopsOnly: false
|
StyleGuideCopsOnly: false
|
||||||
Exclude:
|
Exclude:
|
||||||
|
@ -9,6 +11,21 @@ AllCops:
|
||||||
- 'examples/**/*'
|
- 'examples/**/*'
|
||||||
- 'pkg/**/*'
|
- 'pkg/**/*'
|
||||||
- 'Rakefile'
|
- 'Rakefile'
|
||||||
|
SuggestExtensions: false
|
||||||
|
NewCops: disable
|
||||||
|
|
||||||
|
# ————————————————————————————————————————— disabled cops
|
||||||
|
|
||||||
|
Performance/RegexpMatch:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
Performance/UnfreezeString:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
Style/RedundantReturn:
|
||||||
|
Enabled: false
|
||||||
|
|
||||||
|
# ————————————————————————————————————————— enabled cops
|
||||||
|
|
||||||
Layout/SpaceAfterColon:
|
Layout/SpaceAfterColon:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
@ -26,10 +43,10 @@ Layout/SpaceBeforeFirstArg:
|
||||||
Layout/SpaceInsideParens:
|
Layout/SpaceInsideParens:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
Layout/Tab:
|
Layout/IndentationStyle:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
Layout/TrailingBlankLines:
|
Layout/TrailingEmptyLines:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
Layout/TrailingWhitespace:
|
Layout/TrailingWhitespace:
|
||||||
|
@ -77,5 +94,3 @@ Style/WhileUntilModifier:
|
||||||
Style/TernaryParentheses:
|
Style/TernaryParentheses:
|
||||||
Enabled: true
|
Enabled: true
|
||||||
|
|
||||||
Style/RedundantReturn:
|
|
||||||
Enabled: true
|
|
||||||
|
|
3
Gemfile
3
Gemfile
|
@ -16,7 +16,8 @@ gem "sd_notify"
|
||||||
gem "jruby-openssl", :platform => "jruby"
|
gem "jruby-openssl", :platform => "jruby"
|
||||||
|
|
||||||
unless ENV['PUMA_NO_RUBOCOP'] || RUBY_PLATFORM.include?('mswin')
|
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
|
end
|
||||||
|
|
||||||
if %w(2.2.7 2.2.8 2.2.9 2.2.10 2.3.4 2.4.1).include? RUBY_VERSION
|
if %w(2.2.7 2.2.8 2.2.9 2.2.10 2.3.4 2.4.1).include? RUBY_VERSION
|
||||||
|
|
|
@ -28,5 +28,5 @@ Gem::Specification.new do |s|
|
||||||
end
|
end
|
||||||
|
|
||||||
s.license = "BSD-3-Clause"
|
s.license = "BSD-3-Clause"
|
||||||
s.required_ruby_version = Gem::Requirement.new(">= 2.2")
|
s.required_ruby_version = Gem::Requirement.new(">= 2.4")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue