summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2015-01-28 14:29:17 -0800
committerelijah <elijah@riseup.net>2015-01-28 14:29:17 -0800
commit8eb6b33a36197e2412327b6ec0dc99b93fb011d4 (patch)
tree40348733e61798968ed2789c18d4e0c12294e949 /config
parent512844bea28b17044ddaa13b51b6c0b3842050ee (diff)
do not require a database when running `rake assets:precompile`
Diffstat (limited to 'config')
-rw-r--r--config/initializers/session_store.rb22
1 files changed, 13 insertions, 9 deletions
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb
index 8b63e5b..e8d8b64 100644
--- a/config/initializers/session_store.rb
+++ b/config/initializers/session_store.rb
@@ -1,11 +1,15 @@
# Be sure to restart your server when you modify this file.
-LeapWeb::Application.config.session_store CouchRest::Session::Store,
- expire_after: 1800
-
-CouchRest::Session::Store.configure do |conf|
- conf.environment = Rails.env
- conf.connection_config_file = File.join(Rails.root, 'config', 'couchdb.yml')
- conf.connection[:prefix] =
- Rails.application.class.to_s.underscore.gsub(/\/.*/, '')
-end
+unless ARGV.grep(/assets:precompile/)
+
+ LeapWeb::Application.config.session_store CouchRest::Session::Store,
+ expire_after: 1800
+
+ CouchRest::Session::Store.configure do |conf|
+ conf.environment = Rails.env
+ conf.connection_config_file = File.join(Rails.root, 'config', 'couchdb.yml')
+ conf.connection[:prefix] =
+ Rails.application.class.to_s.underscore.gsub(/\/.*/, '')
+ end
+
+end \ No newline at end of file