From 7c989814988b7c0f9ce0a97fc06d66602df69836 Mon Sep 17 00:00:00 2001 From: David Baumgold Date: Mon, 13 May 2013 11:33:07 -0400 Subject: [PATCH] Install phantom-jasmine via npm, rather than git submodules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because removing a step from our install process is a Good Thing™ --- .gitmodules | 3 --- cms/envs/jasmine.py | 2 +- package.json | 7 +++++-- rakefile | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) delete mode 100644 .gitmodules diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 253bae3686..0000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "common/test/phantom-jasmine"] - path = common/test/phantom-jasmine - url = https://github.com/jcarver989/phantom-jasmine.git \ No newline at end of file diff --git a/cms/envs/jasmine.py b/cms/envs/jasmine.py index e046a6d37c..6c7cbcdcb0 100644 --- a/cms/envs/jasmine.py +++ b/cms/envs/jasmine.py @@ -33,7 +33,7 @@ PIPELINE_JS['spec'] = { JASMINE_TEST_DIRECTORY = PROJECT_ROOT + '/static/coffee' -STATICFILES_DIRS.append(COMMON_ROOT / 'test' / 'phantom-jasmine' / 'lib') +STATICFILES_DIRS.append(REPO_ROOT/'node_modules/phantom-jasmine/lib') # Remove the localization middleware class because it requires the test database # to be sync'd and migrated in order to run the jasmine tests interactively diff --git a/package.json b/package.json index 4ce95d04ce..0f0eb7fef3 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,8 @@ { "name": "mitx", "version": "0.1.0", - "dependencies": { "coffee-script": "1.6.x"} -} \ No newline at end of file + "dependencies": { + "coffee-script": "1.6.X", + "phantom-jasmine": "0.3.X" + } +} diff --git a/rakefile b/rakefile index 32d92a0349..e8a087226d 100644 --- a/rakefile +++ b/rakefile @@ -95,7 +95,7 @@ def template_jasmine_runner(lib) if !coffee_files.empty? sh("node_modules/.bin/coffee -c #{coffee_files.join(' ')}") end - phantom_jasmine_path = File.expand_path("common/test/phantom-jasmine") + phantom_jasmine_path = File.expand_path("node_modules/phantom-jasmine") common_js_root = File.expand_path("common/static/js") common_coffee_root = File.expand_path("common/static/coffee/src") @@ -319,7 +319,7 @@ end compile_assets() phantomjs = ENV['PHANTOMJS_PATH'] || 'phantomjs' django_for_jasmine(system, false) do |jasmine_url| - sh("#{phantomjs} common/test/phantom-jasmine/lib/run_jasmine_test.coffee #{jasmine_url}") + sh("#{phantomjs} node_modules/phantom-jasmine/lib/run_jasmine_test.coffee #{jasmine_url}") end end end @@ -376,7 +376,7 @@ Dir["common/lib/*"].select{|lib| File.directory?(lib)}.each do |lib| task "phantomjs_jasmine_#{lib}" do phantomjs = ENV['PHANTOMJS_PATH'] || 'phantomjs' template_jasmine_runner(lib) do |f| - sh("#{phantomjs} common/test/phantom-jasmine/lib/run_jasmine_test.coffee #{f}") + sh("#{phantomjs} node_modules/phantom-jasmine/lib/run_jasmine_test.coffee #{f}") end end end