lib/nitro/server.rb in nitro-0.29.0 vs lib/nitro/server.rb in nitro-0.30.0
- old
+ new
@@ -86,20 +86,10 @@
def start(options = {})
@map['/'] = options[:controller] if options[:controller]
@dispatcher = options[:dispatcher] || Dispatcher.new(@map)
- # Create the actual store. Copy values already inserted
- # in the temporary cache.
- #--
- # FIXME: cleanup this code
- #++
-
- temp = $global
- $global = $application = Context.global_cache_class.new
- $global.update(temp)
-
return self
end
def root=(controller)
@map['/'] = controller
@@ -126,9 +116,13 @@
runner = Runner.new
runner.setup_options
runner.setup_mode
runner.daemonize if runner.daemon
+ unless Session.cache
+ require 'nitro/session/memory'
+ end
+
server = Server.new
server.start(options)
runner.invoke(server) unless $NITRO_NO_INVOKE