Skip to content

Commit

Permalink
support rack 3: depend on rack-session rather than rack (#73)
Browse files Browse the repository at this point in the history
Rack 3 uses a separate gem named `rack-session` for the stuff we depend on, so
change the dependencies to use that gem instead of `rack` itself, and make a
couple API changes to facilitate supporting this new Rack version.

Fixes: #71
  • Loading branch information
tubbo authored Oct 15, 2022
1 parent d9a13cb commit db8b382
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/rack/session/redis.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def threadsafe?
end

def with_lock(req, default = nil)
@mutex.lock if req.multithread? && threadsafe?
@mutex.lock if threadsafe?
yield
rescue Errno::ECONNREFUSED
if $VERBOSE
Expand Down
2 changes: 1 addition & 1 deletion redis-rack.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Gem::Specification.new do |s|
s.require_paths = ["lib"]

s.add_runtime_dependency 'redis-store', ['< 2', '>= 1.2']
s.add_runtime_dependency 'rack', '>= 2.0.8', '< 3'
s.add_runtime_dependency 'rack-session', '>= 0.2.0'

s.add_development_dependency 'rake', '>= 12.3.3'
s.add_development_dependency 'bundler', '> 1', '< 3'
Expand Down

0 comments on commit db8b382

Please sign in to comment.