Commit a46dece1 authored by jz143's avatar jz143

use database session store in preparation for deploy

parent f34a897f
......@@ -14,7 +14,7 @@ gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
gem 'coffee-rails', '~> 4.1.0'
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
gem 'jquery-rails'
......@@ -34,6 +34,9 @@ gem 'sdoc', '~> 0.4.0', group: :doc
# Use Capistrano for deployment
gem 'capistrano-rails', '~> 1.1', group: :development
# Use database for session store
gem 'activerecord-session_store'
group :development, :test do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem 'byebug'
......
......@@ -37,6 +37,10 @@ GEM
activemodel (= 4.2.4)
activesupport (= 4.2.4)
arel (~> 6.0)
activerecord-session_store (0.1.2)
actionpack (>= 4.0.0, < 5)
activerecord (>= 4.0.0, < 5)
railties (>= 4.0.0, < 5)
activesupport (4.2.4)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
......@@ -94,6 +98,7 @@ GEM
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.3)
libv8 (3.16.14.13)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.3)
......@@ -146,6 +151,7 @@ GEM
thor (>= 0.18.1, < 2.0)
rake (10.4.2)
rdoc (4.2.0)
ref (2.0.0)
sass (3.4.17)
sass-rails (5.0.3)
railties (>= 4.0.0, < 5.0)
......@@ -171,6 +177,9 @@ GEM
colorize (>= 0.7.0)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
thor (0.19.1)
thread_safe (0.3.5)
tilt (1.4.1)
......@@ -191,6 +200,7 @@ PLATFORMS
ruby
DEPENDENCIES
activerecord-session_store
bootstrap-sass (~> 3.3.5)
byebug
capistrano-rails (~> 1.1)
......@@ -209,6 +219,7 @@ DEPENDENCIES
simple_form
spring
sqlite3
therubyracer
turbolinks
uglifier (>= 1.3.0)
web-console (~> 2.0)
......
# Be sure to restart your server when you modify this file.
Rails.application.config.session_store :cookie_store, key: '_appstore_session'
Rails.application.config.session_store :active_record_store, key: '_appstore_session'
class AddSessionsTable < ActiveRecord::Migration
def change
create_table :sessions do |t|
t.string :session_id, :null => false
t.text :data
t.timestamps
end
add_index :sessions, :session_id, :unique => true
add_index :sessions, :updated_at
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20151119212719) do
ActiveRecord::Schema.define(version: 20151122224414) do
create_table "app_files", force: :cascade do |t|
t.string "platform"
......@@ -56,6 +56,16 @@ ActiveRecord::Schema.define(version: 20151119212719) do
add_index "reviews", ["app_id"], name: "index_reviews_on_app_id"
add_index "reviews", ["author_id"], name: "index_reviews_on_author_id"
create_table "sessions", force: :cascade do |t|
t.string "session_id", null: false
t.text "data"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "sessions", ["session_id"], name: "index_sessions_on_session_id", unique: true
add_index "sessions", ["updated_at"], name: "index_sessions_on_updated_at"
create_table "users", force: :cascade do |t|
t.string "netid"
t.datetime "created_at", null: false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment