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

Support Rack 3.1 #1160

Merged
merged 4 commits into from
Jan 16, 2025
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

gem 'rack', "< 3.1"
gem 'rack'
gem 'rackup'
gem 'hikidoc'
gem 'fastimage'
Expand Down
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ GEM
power_assert (2.0.5)
public_suffix (6.0.1)
racc (1.8.1)
rack (3.0.11)
rack (3.1.8)
rack-test (2.2.0)
rack (>= 1.3)
racksh (1.0.1)
Expand Down Expand Up @@ -175,7 +175,7 @@ DEPENDENCIES
mime-types
octokit
pit
rack (< 3.1)
rack
racksh
rackup
rake
Expand Down
2 changes: 1 addition & 1 deletion lib/tdiary/dispatcher.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def update
private

def adopt_rack_request_to_plain_old_tdiary_style( env )
body = env["rack.input"].read
body = env["rack.input"]&.read || ""
env["rack.input"] = StringIO.new(body)
req = TDiary::Request.new( env )
req.params # fill params to tdiary_request
Expand Down
4 changes: 2 additions & 2 deletions lib/tdiary/rack/static.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
require 'rack/file'
require 'rack/files'

module TDiary
module Rack
class Static
def initialize( app, base_dir )
@app = app
@file = base_dir.map{|dir| ::Rack::File.new(dir) }
@file = base_dir.map{|dir| ::Rack::Files.new(dir) }
end

def call( env )
Expand Down
1 change: 1 addition & 0 deletions lib/tdiary/tasks/jasmine.rake
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
begin
require_relative "../../rack/server"
require 'jasmine'
load 'jasmine/tasks/jasmine.rake'
rescue LoadError
Expand Down
Loading