lib/parallel_tests/tasks.rb in parallel_tests-0.5.0 vs lib/parallel_tests/tasks.rb in parallel_tests-0.6.0
- old
+ new
@@ -41,16 +41,16 @@
run_in_parallel('rake db:test:load', args)
end
['test', 'spec', 'features'].each do |type|
desc "run #{type} in parallel with parallel:#{type}[num_cpus]"
- task type, :count, :path_prefix, :options do |t,args|
+ task type, :count, :pattern, :options do |t,args|
$LOAD_PATH << File.expand_path(File.join(File.dirname(__FILE__), '..'))
require "parallel_tests"
- count, prefix, options = ParallelTests.parse_rake_args(args)
+ count, pattern, options = ParallelTests.parse_rake_args(args)
executable = File.join(File.dirname(__FILE__), '..', '..', 'bin', 'parallel_test')
- command = "#{executable} --type #{type} -n #{count} -p '#{prefix}' -r '#{Rails.root}' -o '#{options}'"
+ command = "#{executable} --type #{type} -n #{count} -p '#{pattern}' -r '#{Rails.root}' -o '#{options}'"
abort unless system(command) # allow to chain tasks e.g. rake parallel:spec parallel:features
end
end
end
@@ -64,17 +64,17 @@
$stderr.puts "WARNING -- Deprecated! use parallel:prepare"
Rake::Task['parallel:prepare'].invoke(args[:count])
end
end
- task :parallel, :count, :path_prefix do |t,args|
+ task :parallel, :count, :pattern do |t,args|
$stderr.puts "WARNING -- Deprecated! use parallel:spec"
- Rake::Task['parallel:spec'].invoke(args[:count], args[:path_prefix])
+ Rake::Task['parallel:spec'].invoke(args[:count], args[:pattern])
end
end
namespace :test do
- task :parallel, :count, :path_prefix do |t,args|
+ task :parallel, :count, :pattern do |t,args|
$stderr.puts "WARNING -- Deprecated! use parallel:test"
- Rake::Task['parallel:test'].invoke(args[:count], args[:path_prefix])
+ Rake::Task['parallel:test'].invoke(args[:count], args[:pattern])
end
end