Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drop support for 1.8.7 and 1.9.2. #1070

Merged
merged 1 commit into from Sep 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 0 additions & 2 deletions Manifest.txt
Expand Up @@ -51,8 +51,6 @@ lib/puma/minissl.rb
lib/puma/null_io.rb
lib/puma/plugin.rb
lib/puma/plugin/tmp_restart.rb
lib/puma/rack/backports/uri/common_18.rb
lib/puma/rack/backports/uri/common_192.rb
lib/puma/rack/backports/uri/common_193.rb
lib/puma/rack/builder.rb
lib/puma/rack/urlmap.rb
Expand Down
3 changes: 1 addition & 2 deletions Rakefile
Expand Up @@ -18,7 +18,7 @@ HOE = Hoe.spec "puma" do
spec_extras[:executables] = ['puma', 'pumactl']
spec_extras[:homepage] = self.urls.first

require_ruby_version ">= 1.8.7"
require_ruby_version ">= 1.9.3"

dependency "rack", [">= 1.1", "< 2.0"], :development

Expand Down Expand Up @@ -155,4 +155,3 @@ namespace :test do
task :all => [:test, "test:integration"]
end
end

2 changes: 1 addition & 1 deletion lib/puma/client.rb
Expand Up @@ -291,7 +291,7 @@ def try_to_finish
raise HttpParserError,
"HEADER is longer than allowed, aborting client early."
end

false
end

Expand Down
10 changes: 3 additions & 7 deletions lib/puma/compat.rb
Expand Up @@ -6,13 +6,9 @@ class String
end

unless method_defined? :byteslice
if RUBY_VERSION < '1.9'
alias_method :byteslice, :[]
else
def byteslice(*arg)
enc = self.encoding
self.dup.force_encoding(Encoding::ASCII_8BIT).slice(*arg).force_encoding(enc)
end
def byteslice(*arg)
enc = self.encoding
self.dup.force_encoding(Encoding::ASCII_8BIT).slice(*arg).force_encoding(enc)
end
end
end
59 changes: 0 additions & 59 deletions lib/puma/rack/backports/uri/common_18.rb

This file was deleted.

55 changes: 0 additions & 55 deletions lib/puma/rack/backports/uri/common_192.rb

This file was deleted.

6 changes: 1 addition & 5 deletions lib/puma/util.rb
@@ -1,10 +1,6 @@
major, minor, patch = RUBY_VERSION.split('.').map { |v| v.to_i }

if major == 1 && minor < 9
require 'puma/rack/backports/uri/common_18'
elsif major == 1 && minor == 9 && patch == 2 && RUBY_PATCHLEVEL <= 328 && RUBY_ENGINE != 'jruby'
require 'puma/rack/backports/uri/common_192'
elsif major == 1 && minor == 9 && patch == 3 && RUBY_PATCHLEVEL < 125
if major == 1 && minor == 9 && patch == 3 && RUBY_PATCHLEVEL < 125
require 'puma/rack/backports/uri/common_193'
else
require 'uri/common'
Expand Down
20 changes: 9 additions & 11 deletions test/test_puma_server_ssl.rb
Expand Up @@ -114,19 +114,17 @@ def test_form_submit
assert_equal "https", body
end

unless RUBY_VERSION =~ /^1.8/
def test_ssl_v3_rejection
return if DISABLE_SSL
@http.ssl_version='SSLv3'
assert_raises(OpenSSL::SSL::SSLError) do
@http.start do
Net::HTTP::Get.new '/'
end
end
unless defined?(JRUBY_VERSION)
assert_match("wrong version number", @events.error.message) if @events.error
def test_ssl_v3_rejection
return if DISABLE_SSL
@http.ssl_version='SSLv3'
assert_raises(OpenSSL::SSL::SSLError) do
@http.start do
Net::HTTP::Get.new '/'
end
end
unless defined?(JRUBY_VERSION)
assert_match("wrong version number", @events.error.message) if @events.error
end
end

end
Expand Down