mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
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
4 changed files with 34 additions and 25 deletions
29
.github/workflows/tests.yaml
vendored
29
.github/workflows/tests.yaml
vendored
|
@ -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
|
||||
|
|
25
.rubocop.yml
25
.rubocop.yml
|
@ -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
|
||||
|
|
3
Gemfile
3
Gemfile
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue