mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Merge pull request #1813 from schneems/schneems/ruby-25
[close #1811] Minimum Ruby version >= 2.5
This commit is contained in:
commit
60f70cd879
11 changed files with 15 additions and 18 deletions
|
@ -1,6 +1,6 @@
|
|||
AllCops:
|
||||
DisabledByDefault: true
|
||||
TargetRubyVersion: 2.2
|
||||
TargetRubyVersion: 2.5
|
||||
DisplayCopNames: true
|
||||
StyleGuideCopsOnly: false
|
||||
Exclude:
|
||||
|
|
|
@ -8,8 +8,7 @@ before_install:
|
|||
r_eng="$(ruby -e 'STDOUT.write RUBY_ENGINE')";
|
||||
rv="$(ruby -e 'STDOUT.write RUBY_VERSION')";
|
||||
if [ "$r_eng" == "ruby" ]; then
|
||||
if [ "$rv" \< "2.3" ]; then gem update --system 2.7.9 --no-document
|
||||
elif [ "$rv" \< "2.6" ]; then gem update --system --no-document --conservative
|
||||
if [ "$rv" \< "2.6" ]; then gem update --system --no-document --conservative
|
||||
fi
|
||||
fi
|
||||
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
|
||||
|
@ -25,9 +24,6 @@ script:
|
|||
- bundle exec rake
|
||||
|
||||
rvm:
|
||||
- 2.2.10
|
||||
- 2.3.8
|
||||
- 2.4.6
|
||||
- 2.5.5
|
||||
- 2.6.3
|
||||
- ruby-head
|
||||
|
@ -37,9 +33,6 @@ matrix:
|
|||
include:
|
||||
- rvm: ruby-head
|
||||
env: RUBYOPT="--jit"
|
||||
- rvm: 2.4.6
|
||||
os: osx
|
||||
osx_image: xcode10.2
|
||||
- rvm: 2.5.5
|
||||
os: osx
|
||||
osx_image: xcode10.2
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
* Add option to suppress SignalException on SIGTERM (#1690)
|
||||
* Allow mutual TLS CA to be set using `ssl_bind` DSL (#1689)
|
||||
* Reactor now uses nio4r instead of `select` (#1728)
|
||||
* Minimum Ruby version now >= 2.5 (#1813)
|
||||
* x bugfixes
|
||||
* Do not accept new requests on shutdown (#1685, #1808)
|
||||
* Fix 3 corner cases when request body is chunked (#1508)
|
||||
|
|
|
@ -63,7 +63,7 @@ module Puma
|
|||
remove = []
|
||||
|
||||
ENV.each do |k,v|
|
||||
if k =~ /PUMA_INHERIT_\d+/
|
||||
if /PUMA_INHERIT_\d+/.match?(k)
|
||||
fd, url = v.split(":", 2)
|
||||
@inherited_fds[url] = fd.to_i
|
||||
remove << k
|
||||
|
@ -75,7 +75,7 @@ module Puma
|
|||
key = [ :unix, Socket.unpack_sockaddr_un(sock.getsockname) ]
|
||||
rescue ArgumentError
|
||||
port, addr = Socket.unpack_sockaddr_in(sock.getsockname)
|
||||
if addr =~ /\:/
|
||||
if /\:/.match?(addr)
|
||||
addr = "[#{addr}]"
|
||||
end
|
||||
key = [ :tcp, addr, port ]
|
||||
|
|
|
@ -348,7 +348,7 @@ module Puma
|
|||
end
|
||||
|
||||
if bytes
|
||||
token = "".dup
|
||||
token = +""
|
||||
bytes.each_byte { |b| token << b.to_s(16) }
|
||||
else
|
||||
token = (0..count).to_a.map { rand(255).to_s(16) }.join
|
||||
|
|
|
@ -105,7 +105,7 @@ module Puma
|
|||
# On Linux, use TCP_CORK to better control how the TCP stack
|
||||
# packetizes our stream. This improves both latency and throughput.
|
||||
#
|
||||
if RUBY_PLATFORM =~ /linux/
|
||||
if RUBY_PLATFORM.match?(/linux/)
|
||||
UNPACK_TCP_STATE_FROM_TCP_INFO = "C".freeze
|
||||
|
||||
# 6 == Socket::IPPROTO_TCP
|
||||
|
|
|
@ -17,5 +17,8 @@ Gem::Specification.new do |s|
|
|||
%w[History.md LICENSE README.md]
|
||||
s.homepage = "http://puma.io"
|
||||
s.license = "BSD-3-Clause"
|
||||
s.required_ruby_version = Gem::Requirement.new(">= 2.2")
|
||||
|
||||
# We will guarantee to support the last 2 major releases,
|
||||
# and may choose to support further back as we see fit.
|
||||
s.required_ruby_version = Gem::Requirement.new(">= 2.5")
|
||||
end
|
||||
|
|
|
@ -11,7 +11,7 @@ log = File.read("t1-stdout")
|
|||
File.unlink "t1-stdout" if File.file? "t1-stdout"
|
||||
File.unlink "t1-pid" if File.file? "t1-pid"
|
||||
|
||||
if log =~ %r!GET / HTTP/1\.1!
|
||||
if %r!GET / HTTP/1\.1!.match?(log)
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
|
|
|
@ -186,7 +186,7 @@ class TestIntegration < Minitest::Test
|
|||
until done
|
||||
@events.stdout.rewind
|
||||
log = @events.stdout.readlines.join("")
|
||||
if log =~ /- Worker \d \(pid: \d+\) booted, phase: 1/
|
||||
if /- Worker \d \(pid: \d+\) booted, phase: 1/.match?(log)
|
||||
assert_match(/TERM sent/, log)
|
||||
assert_match(/- Worker \d \(pid: \d+\) booted, phase: 1/, log)
|
||||
done = true
|
||||
|
|
|
@ -37,7 +37,7 @@ class TestPersistent < Minitest::Test
|
|||
end
|
||||
|
||||
def lines(count, s=@client)
|
||||
str = "".dup
|
||||
str = +""
|
||||
Timeout.timeout(5) do
|
||||
count.times { str << s.gets }
|
||||
end
|
||||
|
|
|
@ -13,7 +13,7 @@ Make-Const repo_name 'puma'
|
|||
Make-Const url_repo 'https://github.com/puma/puma.git'
|
||||
|
||||
#———————————————————————————————————————————————————————————————— lowest ruby version
|
||||
Make-Const ruby_vers_low 22
|
||||
Make-Const ruby_vers_low 25
|
||||
# null = don't compile; false = compile, ignore test (allow failure);
|
||||
# true = compile & test
|
||||
Make-Const trunk $false ; Make-Const trunk_x64 $false
|
||||
|
|
Loading…
Reference in a new issue