Skip to content
This repository has been archived by the owner on Feb 14, 2018. It is now read-only.

make session store configurable #228

Merged
merged 1 commit into from
May 14, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ gem "png"
gem "rest-client"
gem "ruby-openid"
gem "couchrest"
gem "memcache-client", :require => 'memcache'

group :development do
gem 'ruby-debug', :require => 'ruby-debug', :platform => :mri_18
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ GEM
rbx-require-relative (> 0.0.4)
linecache19 (0.5.12)
ruby_core_source (>= 0.1.4)
memcache-client (1.8.5)
mime-types (1.18)
multi_json (1.0.4)
netrc (0.7.1)
Expand Down Expand Up @@ -112,6 +113,7 @@ DEPENDENCIES
heroku
json
launchy
memcache-client
png
rack-test (= 0.5.6)
rest-client
Expand Down
6 changes: 5 additions & 1 deletion server/sinatra/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ class Controller < Sinatra::Base
set :views , File.join(SINATRA_ROOT, "views")
set :haml, :format => :html5
set :versions, `git log -10 --oneline` || "no git log"
enable :sessions
if ENV.include?('SESSION_STORE')
use ENV['SESSION_STORE'].split('::').inject(Object) { |mod, const| mod.const_get(const) }
else
enable :sessions
end
helpers ServerHelpers

Store.set ENV['STORE_TYPE'], APP_ROOT
Expand Down