Merge branch 'new-settings' into asset-pipeline
This commit is contained in:
10
rakefile
10
rakefile
@@ -38,10 +38,12 @@ task :default => [:pep8, :pylint, :test]
|
||||
|
||||
directory REPORT_DIR
|
||||
|
||||
desc "Run pep8 on all of djangoapps"
|
||||
task :pep8 => REPORT_DIR do
|
||||
sh("pep8 --ignore=E501 djangoapps | tee #{REPORT_DIR}/pep8.report")
|
||||
end
|
||||
|
||||
desc "Run pylint on all of djangoapps"
|
||||
task :pylint => REPORT_DIR do
|
||||
Dir.chdir("djangoapps") do
|
||||
Dir["*"].each do |app|
|
||||
@@ -50,12 +52,20 @@ task :pylint => REPORT_DIR do
|
||||
end
|
||||
end
|
||||
|
||||
desc "Run all django tests on our djangoapps"
|
||||
task :test => REPORT_DIR do
|
||||
ENV['NOSE_XUNIT_FILE'] = File.join(REPORT_DIR, "nosetests.xml")
|
||||
django_admin = ENV['DJANGO_ADMIN_PATH'] || select_executable('django-admin.py', 'django-admin')
|
||||
sh("#{django_admin} test --settings=envs.test --pythonpath=. $(ls djangoapps)")
|
||||
end
|
||||
|
||||
desc "Start a local server with the specified environment (defaults to dev). Other useful environments are devplus (for dev testing with a real local database)"
|
||||
task :runserver, :env do |t, args|
|
||||
args.with_defaults(:env => 'dev')
|
||||
django_admin = ENV['DJANGO_ADMIN_PATH'] || select_executable('django-admin.py', 'django-admin')
|
||||
sh("#{django_admin} runserver --settings=envs.#{args.env} --pythonpath=.")
|
||||
end
|
||||
|
||||
task :package do
|
||||
FileUtils.mkdir_p(BUILD_DIR)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user