Commit 03a9765b by Nate Hardison

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.
parent 1fd1f630
...@@ -147,7 +147,7 @@ end ...@@ -147,7 +147,7 @@ end
# env arguments to be passed to all dependent tasks. # env arguments to be passed to all dependent tasks.
desc "Compile coffeescript and sass, and then run collectstatic in the specified environment" desc "Compile coffeescript and sass, and then run collectstatic in the specified environment"
task "#{system}:gather_assets:#{env}" do task "#{system}:gather_assets:#{env}" do
task(:gather_assets).invoke(system, env) Rake::Task[:gather_assets].invoke(system, env)
end end
end end
end end
...@@ -30,7 +30,7 @@ end ...@@ -30,7 +30,7 @@ end
desc desc
task system, [:env, :options] do |t, args| task system, [:env, :options] do |t, args|
args.with_defaults(:env => 'dev', :options => default_options[system]) 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 end
desc "Start #{system} Celery worker" desc "Start #{system} Celery worker"
......
...@@ -104,12 +104,12 @@ end ...@@ -104,12 +104,12 @@ end
[:lms, :cms].each do |system| [:lms, :cms].each do |system|
desc "Open jasmine tests for #{system} in your default browser" desc "Open jasmine tests for #{system} in your default browser"
task "browse_jasmine_#{system}" do task "browse_jasmine_#{system}" do
task(:browse_jasmine).invoke(system, 'jasmine') Rake::Task[:browse_jasmine].invoke(system, 'jasmine')
end end
desc "Use phantomjs to run jasmine tests for #{system} from the console" desc "Use phantomjs to run jasmine tests for #{system} from the console"
task "phantomjs_jasmine_#{system}" do task "phantomjs_jasmine_#{system}" do
task(:phantomjs_jasmine).invoke(system, 'jasmine') Rake::Task[:phantomjs_jasmine].invoke(system, 'jasmine')
end end
end end
......
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