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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

bump to rack ~>3 #2287

Merged
merged 1 commit into from Apr 16, 2024
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
5 changes: 3 additions & 2 deletions Gemfile
Expand Up @@ -45,8 +45,9 @@ group :development do
gem "minitest", ">= 4.0"
gem "mocha", ">= 2.0"
gem "oga", ">= 2.5", "< 3"
gem "rack", ">= 1.3.0", "< 3"
gem "rack-test", ">= 0.6.3"
gem "rack", "~> 3"
gem "rackup", "~> 2.1"
gem "rack-test", "~> 2.1"
gem "rake", ">= 10.5.0"
gem 'rb-readline', '~> 0.4.2'
gem 'rubocop', '~> 1.6', :platforms => [:mri]
Expand Down
Expand Up @@ -134,7 +134,7 @@ def default_errors
configure :production do
error ::Exception do
logger.exception env['sinatra.error']
halt(500, { 'Content-Type' => 'text/html' }, ['<h1>Internal Server Error</h1>'])
halt(500, { 'content-type' => 'text/html' }, ['<h1>Internal Server Error</h1>'])
end unless errors.has_key?(::Exception)
end
end
Expand Down
2 changes: 1 addition & 1 deletion padrino-core/lib/padrino-core/router.rb
Expand Up @@ -91,7 +91,7 @@ def call(env)
env['SCRIPT_NAME'] = script_name
env['PATH_INFO'] = path_info
Padrino::Logger::Rack.new(nil,'/').send(:log, env, 404, {}, began_at) if logger.debug?
[404, {"Content-Type" => "text/plain", "X-Cascade" => "pass"}, ["Not Found: #{path_info}"]]
[404, {"content-type" => "text/plain", "x-cascade" => "pass"}, ["Not Found: #{path_info}"]]
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion padrino-core/lib/padrino-core/server.rb
Expand Up @@ -30,7 +30,7 @@ def self.detect_application(options)
##
# This module builds a Padrino server to run the project based on available handlers.
#
class Server < Rack::Server
class Server < Rackup::Server
DEFAULT_ADDRESS = { :Host => '127.0.0.1', :Port => 3000 }

# Server Handlers
Expand Down
2 changes: 1 addition & 1 deletion padrino-core/padrino-core.gemspec
Expand Up @@ -21,6 +21,6 @@ Gem::Specification.new do |s|
s.rdoc_options = ["--charset=UTF-8"]

s.add_dependency("padrino-support", Padrino.version)
s.add_dependency("sinatra", ">= 2.2.4")
s.add_dependency("sinatra", "~> 4")
s.add_dependency("thor", "~> 1.0")
end
Expand Up @@ -9,6 +9,6 @@ require 'padrino-core/cli/launcher'
ARGV.unshift('start') if ARGV.first.nil? || ARGV.first.start_with?('-')
Padrino::Cli::Launcher.start ARGV

# Start the app with Rack::Server
#require "rack"
#Rack::Server.start
# Start the app with Rackup::Server
#require "rackup"
#Rackup::Server.start