Skip to content

Commit

Permalink
bump to rack ~>3
Browse files Browse the repository at this point in the history
  • Loading branch information
achiurizo committed Apr 3, 2024
1 parent b3c95d1 commit 3448494
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 9 deletions.
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit 3448494

Please sign in to comment.