From 03a9765b79f91ecde0dc9ac4591ddef055da62dc Mon Sep 17 00:00:00 2001 From: Nate Hardison Date: Mon, 3 Jun 2013 10:00:50 -0700 Subject: [PATCH] Change `task.invoke` to `Rake::Task.invoke` Using `task()` reopens the definition of the task, and all we really need to do is get a reference to the task itself to invoke it. --- rakefiles/assets.rake | 2 +- rakefiles/django.rake | 2 +- rakefiles/jasmine.rake | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rakefiles/assets.rake b/rakefiles/assets.rake index aca6ea2e52..45a7de1102 100644 --- a/rakefiles/assets.rake +++ b/rakefiles/assets.rake @@ -147,7 +147,7 @@ end # env arguments to be passed to all dependent tasks. desc "Compile coffeescript and sass, and then run collectstatic in the specified environment" task "#{system}:gather_assets:#{env}" do - task(:gather_assets).invoke(system, env) + Rake::Task[:gather_assets].invoke(system, env) end end end diff --git a/rakefiles/django.rake b/rakefiles/django.rake index 910d4e39cc..b1adf24050 100644 --- a/rakefiles/django.rake +++ b/rakefiles/django.rake @@ -30,7 +30,7 @@ end desc task system, [:env, :options] do |t, args| args.with_defaults(:env => 'dev', :options => default_options[system]) - task(:runserver).invoke(system, args.env, args.options) + Rake::Task[:runserver].invoke(system, args.env, args.options) end desc "Start #{system} Celery worker" diff --git a/rakefiles/jasmine.rake b/rakefiles/jasmine.rake index ecf88eb4e5..bd1c7e5d6c 100644 --- a/rakefiles/jasmine.rake +++ b/rakefiles/jasmine.rake @@ -104,12 +104,12 @@ end [:lms, :cms].each do |system| desc "Open jasmine tests for #{system} in your default browser" task "browse_jasmine_#{system}" do - task(:browse_jasmine).invoke(system, 'jasmine') + Rake::Task[:browse_jasmine].invoke(system, 'jasmine') end desc "Use phantomjs to run jasmine tests for #{system} from the console" task "phantomjs_jasmine_#{system}" do - task(:phantomjs_jasmine).invoke(system, 'jasmine') + Rake::Task[:phantomjs_jasmine].invoke(system, 'jasmine') end end