forked from openedx/edx-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support compiling SASS for only one system
- Loading branch information
1 parent
c13e623
commit 99c90a6
Showing
8 changed files
with
174 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
source 'https://rubygems.org' | ||
gem 'sass', '3.3.5' | ||
gem 'bourbon', '~> 4.0.2' | ||
gem 'neat', '~> 1.6.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
"""Unit tests for the Paver asset tasks.""" | ||
|
||
import ddt | ||
from paver.easy import call_task | ||
|
||
from .utils import PaverTestCase | ||
|
||
|
||
@ddt.ddt | ||
class TestPaverAssetTasks(PaverTestCase): | ||
""" | ||
Test the Paver asset tasks. | ||
""" | ||
@ddt.data( | ||
[""], | ||
["--force"], | ||
["--debug"], | ||
["--system=lms"], | ||
["--system=lms --force"], | ||
["--system=studio"], | ||
["--system=studio --force"], | ||
["--system=lms,studio"], | ||
["--system=lms,studio --force"], | ||
) | ||
@ddt.unpack | ||
def test_compile_sass(self, options): | ||
""" | ||
Test the "compile_sass" task. | ||
""" | ||
parameters = options.split(" ") | ||
system = [] | ||
if "--system=studio" not in parameters: | ||
system += ["lms"] | ||
if "--system=lms" not in parameters: | ||
system += ["studio"] | ||
debug = "--debug" in parameters | ||
force = "--force" in parameters | ||
self.reset_task_messages() | ||
call_task('pavelib.assets.compile_sass', options={"system": system, "debug": debug, "force": force}) | ||
expected_messages = [] | ||
if force: | ||
expected_messages.append("rm -rf common/static/css/*.css") | ||
expected_messages.append("libsass common/static/sass") | ||
if "lms" in system: | ||
if force: | ||
expected_messages.append("rm -rf lms/static/css/*.css") | ||
expected_messages.append("libsass lms/static/sass") | ||
if force: | ||
expected_messages.append("rm -rf lms/static/css/*.css") | ||
expected_messages.append("libsass lms/static/themed_sass") | ||
if force: | ||
expected_messages.append("rm -rf lms/static/certificates/css/*.css") | ||
expected_messages.append("libsass lms/static/certificates/sass") | ||
if "studio" in system: | ||
if force: | ||
expected_messages.append("rm -rf cms/static/css/*.css") | ||
expected_messages.append("libsass cms/static/sass") | ||
self.assertEquals(self.task_messages, expected_messages) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters