Permalink
Browse files

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

…a dev server locally from those settings
  • Loading branch information...
cpennington committed May 18, 2012
1 parent b8b9928 commit a2eb8fcada01cce096cad8eabdeccb449149d4db
Showing with 10 additions and 717 deletions.
  1. +10 −0 rakefile
  2. +0 −717 settings.py
@@ -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)
Oops, something went wrong.

0 comments on commit a2eb8fc

Please sign in to comment.