Skip to content
Browse files
Delete 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 a2eb8fc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 717 deletions.
@@ -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}/")

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

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')
sh("#{django_admin} test --settings=envs.test --pythonpath=. $(ls djangoapps)")

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')
sh("#{django_admin} runserver --settings=envs.#{args.env} --pythonpath=.")

task :package do

0 comments on commit a2eb8fc

Please sign in to comment.