Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Roll-your-own session stores are broken #1545
makes it impossible to replace the session store, because that requires to switch
I agree that the issue exists but I don't like inventing new non-functional flags.
What do you think about something like this:
# override sinatra session setup: def setup_sessions(builder) if sessions.kind_of? Proc sessions.call builder enable :sessions else super builder end end
This way we will have internals getting proper answer on
set :sessions do |builder| builder.use Rack::Session::DataMapper, :key => 'sid', :path => '/', :secret => 'DympNaneu', :expire_after => 1.month end
Well, at the same time I don't like overriding base library behavior with self-cooked implementations. We defer to the Sinatra documentation for all such things, so we should try to keep that intact.
Also, consider that any reasonable multi-app setup doesn't touch
Padrino.use Rack::Session::DataMapper #...
The other option would be to get rid of the warning for