revert settings.persistorManager

This commit is contained in:
Oliver Matthews 2014-02-26 11:49:15 +00:00
parent 4b5f9ad4fb
commit e0f0bfb0ea
3 changed files with 6 additions and 6 deletions

View file

@ -2,9 +2,9 @@ settings = require("settings-sharelatex")
logger = require("logger-sharelatex") logger = require("logger-sharelatex")
S3PersistorManager = require("./S3PersistorManager") S3PersistorManager = require("./S3PersistorManager")
logger.log backend:settings.persistorManager, "Loading backend" logger.log backend:settings.filestoreBackend, "Loading backend"
module.exports = switch settings.persistorManager module.exports = switch settings.filestoreBackend
when "s3",null when "s3",null
S3PersistorManager S3PersistorManager
else else
throw new Error( "Unknown filestore backend: #{settings.persistorManager}" ) throw new Error( "Unknown filestore backend: #{settings.filestoreBackend}" )

View file

@ -8,7 +8,7 @@ module.exports =
# current options are: # current options are:
# "s3" - Amazon S3 # "s3" - Amazon S3
# if no persistor is chosen, s3 will be used by default # if no persistor is chosen, s3 will be used by default
persistorManager: "s3" filestoreBackend: "s3"
# ShareLaTeX stores binary files like images in S3. # ShareLaTeX stores binary files like images in S3.
# Fill in your Amazon S3 credentials below. # Fill in your Amazon S3 credentials below.

View file

@ -22,7 +22,7 @@ describe "PersistorManagerTests", ->
describe "test s3 mixin", -> describe "test s3 mixin", ->
beforeEach -> beforeEach ->
@settings = @settings =
persistorManager: "s3" filestoreBackend: "s3"
@requires = @requires =
"./S3PersistorManager": @S3PersistorManager "./S3PersistorManager": @S3PersistorManager
"settings-sharelatex": @settings "settings-sharelatex": @settings
@ -81,7 +81,7 @@ describe "PersistorManagerTests", ->
describe "test invalid mixins", -> describe "test invalid mixins", ->
it "should not load an invalid wrapper", (done) -> it "should not load an invalid wrapper", (done) ->
@settings = @settings =
persistorManager:"magic" filestoreBackend:"magic"
@requires = @requires =
"./S3PersistorManager": @S3PersistorManager "./S3PersistorManager": @S3PersistorManager
"settings-sharelatex": @settings "settings-sharelatex": @settings