edx/edx-platform — pull request #2387 by yarko (2014-01-31 03:00:45+00:00)
Title: assets: add theme path to coffeescript's processing;  rakefile: fix feature/env settings

This is another step towards enabling product development off of Open edX:

rakefile setup ENV_TOKENS (supposed to b django settings & feature flags) based on SERVICE_VARIANT, but the *.env.json files which are commonly set in the baseline are cms.env.json and lms.env.json - yet the feature settings weren't getting passed on to assets processing.

This corrects the base rakefile:

* if SERVICE_VARIANT is set from the environment or call, it is honored.
* if not, the rake command line ARGV is parsed for command specifiers indicating either lms or studio/cms;
* if lms or studio is found, then the appropriate *.env.json file is setup for parsing, and passing on to tasks;

I didn't expect both to be present (for example: `rake devstack[lms]` or `rake cms:gather_assets:devstack` seem to preclude both lms and [studio, cms] being present on the command line. If there were such an instance, lms would win.

With this change, it is possible to effect lms theming and "have it just work".

There is a remaining issue with cms theming, where manage.py cms preprocess_assets seems to edit and overwrite the theme includ settings configured by other tasks in the various standard *.scss files. That will be addressed in another pull request.

This pull also enables automatic "working" for an associated pull [TBD] for configuration, where vagrant/base bringups are setup for specific ("nailed") repositories & versions (branches), so this is part of enabling that also.