lib/core/project.rb in buildr-0.22.0 vs lib/core/project.rb in buildr-1.0.0
- old
+ new
@@ -160,10 +160,11 @@
end
# See Buildr#projects.
def projects(*names) #:nodoc:
options = names.pop if Hash === names.last
+ rake_check_options options, :in if options
@projects ||= {}
names = @projects.keys if names.empty?
if options && options[:in]
parent = @projects[options[:in].to_s] or raise "No such project #{options[:in].to_s}"
names.uniq.map { |name| @projects[name] or raise "No such project #{name}" }.
@@ -446,10 +447,10 @@
# Define a recursive task. A recursive task executes itself and the same task
# in all the sub-projects.
def recursive_task(args, &block)
task_name, deps = Rake.application.resolve_args(args)
deps = [deps] unless deps.respond_to?(:to_ary)
- task = ENV["PARALLEL"] =~ /(yes|on|true)/ ? multitask(task_name) : task(task_name)
+ task = Buildr.options.parallel ? multitask(task_name) : task(task_name)
Rake.application.lookup(task_name, parent.name.split(":")).enhance [task] if parent
task.enhance deps, &block
end
def execute() #:nodoc: