etosch/SurveyMan — pull request #387 by dbarowy (2014-05-21 17:56:59+00:00)
Title: Only init the requested backend resources.

I noticed that SurveyMan was looking for `~/surveyman/mturk_config` regardless of whether I started the system with the MTurk backend or not. Presumably you used `HashMap`s for these resources because you intend to allow the user to utilize multiple backends simultaneously at some point, but it doesn't appear that you presently make use of this. Anyway, this changes `init` only to initialize the specified backend, and it makes exceptions wrt missing `mturk_config` files go away.

Note that you actually load the `mturk_config` in several places, but you only check for a missing file in one place, which is why I get an exception even when running SurveyMan with the `LOCALHOST` parameter. It would be better if it were loaded once, but since that may entail more substantial changes, I will defer them to you.