Sha256: 3ea8b6d6d9235adc9b010b8b19a0ef30414ab412b00def571406336b6362da4f
Contents?: true
Size: 1.09 KB
Versions: 19
Compression:
Stored size: 1.09 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 => RubyApp::Application.root}) return @application.call(environment) ensure RubyApp::Session.unload! end end end end end
Version data entries
19 entries across 19 versions & 1 rubygems