mirror of
https://github.com/puma/puma.git
synced 2022-11-09 13:48:40 -05:00
Remove more unneccessary Ruby version code (#2947)
This commit is contained in:
parent
9b8bb88d8d
commit
1576f9bf71
6 changed files with 7 additions and 14 deletions
2
Gemfile
2
Gemfile
|
@ -21,7 +21,7 @@ unless ENV['PUMA_NO_RUBOCOP'] || RUBY_PLATFORM.include?('mswin')
|
|||
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
|
||||
if RUBY_VERSION == '2.4.1'
|
||||
gem "stopgap_13632", "~> 1.0", :platforms => ["mri", "mingw", "x64_mingw"]
|
||||
end
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ require 'mkmf'
|
|||
|
||||
dir_config("puma_http11")
|
||||
|
||||
if $mingw && RUBY_VERSION >= '2.4'
|
||||
if $mingw
|
||||
append_cflags '-fstack-protector-strong -D_FORTIFY_SOURCE=2'
|
||||
append_ldflags '-fstack-protector-strong -l:libssp.a'
|
||||
have_library 'ssp'
|
||||
|
@ -13,7 +13,7 @@ unless ENV["PUMA_DISABLE_SSL"]
|
|||
has_openssl_dir = dir_config('openssl').any?
|
||||
found_pkg_config = !has_openssl_dir && pkg_config('openssl')
|
||||
|
||||
found_ssl = if (!$mingw || RUBY_VERSION >= '2.4') && found_pkg_config
|
||||
found_ssl = if !$mingw && found_pkg_config
|
||||
puts 'using OpenSSL pkgconfig (openssl.pc)'
|
||||
true
|
||||
elsif have_library('libcrypto', 'BIO_read') && have_library('libssl', 'SSL_CTX_new')
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# Copyright (c) 2011 Evan Phoenix
|
||||
# Copyright (c) 2005 Zed A. Shaw
|
||||
|
||||
if %w(2.2.7 2.2.8 2.2.9 2.2.10 2.3.4 2.4.1).include? RUBY_VERSION
|
||||
if RUBY_VERSION == '2.4.1'
|
||||
begin
|
||||
require 'stopgap_13632'
|
||||
rescue LoadError
|
||||
|
|
|
@ -277,7 +277,6 @@ class TestIntegration < Minitest::Test
|
|||
- file descriptors are not preserved on exec on JRuby; connection reset errors are expected during restarts
|
||||
MSG
|
||||
skip_if :truffleruby, suffix: ' - Undiagnosed failures on TruffleRuby'
|
||||
skip "Undiagnosed failures on Ruby 2.2" if RUBY_VERSION < '2.3'
|
||||
|
||||
args = "-w #{workers} -t 0:5 -q test/rackup/hello_with_delay.ru"
|
||||
if Puma.windows?
|
||||
|
|
|
@ -88,7 +88,6 @@ class TestIntegrationCluster < TestIntegration
|
|||
|
||||
def test_term_closes_listeners_tcp
|
||||
skip_unless_signal_exist? :TERM
|
||||
skip "Intermittent failure on Ruby 2.2" if RUBY_VERSION < '2.3'
|
||||
term_closes_listeners unix: false
|
||||
end
|
||||
|
||||
|
@ -132,8 +131,6 @@ class TestIntegrationCluster < TestIntegration
|
|||
end
|
||||
|
||||
def test_term_worker_clean_exit
|
||||
skip "Intermittent failure on Ruby 2.2" if RUBY_VERSION < '2.3'
|
||||
|
||||
cli_server "-w #{workers} test/rackup/hello.ru"
|
||||
|
||||
# Get the PIDs of the child workers.
|
||||
|
|
|
@ -140,8 +140,7 @@ class TestPumaServerSSL < Minitest::Test
|
|||
skip("SSLv3 protocol is unavailable") if Puma::MiniSSL::OPENSSL_NO_SSL3
|
||||
start_server
|
||||
@http.ssl_version= :SSLv3
|
||||
# Ruby 2.4.5 on Travis raises ArgumentError
|
||||
assert_raises(OpenSSL::SSL::SSLError, ArgumentError) do
|
||||
assert_raises(OpenSSL::SSL::SSLError) do
|
||||
@http.start do
|
||||
Net::HTTP::Get.new '/'
|
||||
end
|
||||
|
@ -161,8 +160,7 @@ class TestPumaServerSSL < Minitest::Test
|
|||
else
|
||||
@http.ssl_version = :TLSv1
|
||||
end
|
||||
# Ruby 2.4.5 on Travis raises ArgumentError
|
||||
assert_raises(OpenSSL::SSL::SSLError, ArgumentError) do
|
||||
assert_raises(OpenSSL::SSL::SSLError) do
|
||||
@http.start do
|
||||
Net::HTTP::Get.new '/'
|
||||
end
|
||||
|
@ -181,8 +179,7 @@ class TestPumaServerSSL < Minitest::Test
|
|||
else
|
||||
@http.ssl_version = :TLSv1_1
|
||||
end
|
||||
# Ruby 2.4.5 on Travis raises ArgumentError
|
||||
assert_raises(OpenSSL::SSL::SSLError, ArgumentError) do
|
||||
assert_raises(OpenSSL::SSL::SSLError) do
|
||||
@http.start do
|
||||
Net::HTTP::Get.new '/'
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue