lib/restpack_web/sinatra/app.rb in restpack_web-0.0.5 vs lib/restpack_web/sinatra/app.rb in restpack_web-0.2.17
- old
+ new
@@ -1,13 +1,20 @@
-module RestPack::Web::Sinatra
- module App
- def self.included(base)
- base.use RestPack::Web::Rack::Domain
- base.use RestPack::Web::Rack::Session
- base.use RestPack::Web::Rack::User
+require 'rack-auto-session-domain'
- base.before do
- @restpack = RestPack::Web::Context.new(env)
+module RestPack
+ module Web
+ module Sinatra
+ module App
+ def self.included(base)
+ base.use Rack::AutoSessionDomain
+ base.use RestPack::Web::App
+ base.enable :sessions
+ base.set :session_secret, 'c40b83f9048c497891f0f71e4b040a3f' #TODO: GJ: from restpack config
+
+ base.before do
+ @restpack = RestPack::Web::Context.new(env)
+ end
+ end
end
end
end
-end
+end
\ No newline at end of file