Sha256: f3f5ee0b4140bc01f0a68aa504d8cec9cbc9db9f78c6fc3950a2f00aa26a36a6
Contents?: true
Size: 1.07 KB
Versions: 122
Compression:
Stored size: 1.07 KB
Contents
module RubyApp module Rack require 'ruby_app' class Session def initialize(application) @application = application end def call(environment) RubyApp::Session.load!(RubyApp::Request.cookies['_session'], RubyApp::Request.query['script']) begin #RubyApp::Log.debug("#{RubyApp::Log.prefix(self, __method__)} RubyApp::Session.session_id=#{RubyApp::Session.session_id.inspect}") #RubyApp::Log.debug("#{RubyApp::Log.prefix(self, __method__)} RubyApp::Session.expires=#{RubyApp::Session.expires.inspect}") #RubyApp::Log.debug("#{RubyApp::Log.prefix(self, __method__)} (now)=#{Time.now.inspect}") RubyApp::Response.set_cookie('_session', { :value => RubyApp::Session.session_id, :expires => RubyApp::Session.expires, :path => '/'}) return @application.call(environment) ensure RubyApp::Session.unload! end end end end end
Version data entries
122 entries across 122 versions & 1 rubygems