Commit a2eb8fca by Calen Pennington

Delete settings.py in favor of envs/*.py, and add a rake task to run a dev…

Delete settings.py in favor of envs/*.py, and add a rake task to run a dev server locally from those settings
parent b8b9928a
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment