lib/core/project.rb in buildr-0.20.0 vs lib/core/project.rb in buildr-0.21.0

- old
+ new

@@ -29,11 +29,12 @@ # inherited_attr(:created_on) { Time.now } def inherited_attr(symbol, default = nil, &block) block ||= proc { default } attr_accessor symbol define_method "#{symbol}_with_inheritence" do - unless value = send("#{symbol}_without_inheritence") + value = send("#{symbol}_without_inheritence") + if value.nil? value = parent ? parent.send(symbol) : self.instance_eval(&block) send "#{symbol}=", value end value end @@ -452,9 +453,10 @@ task.enhance &block end end def execute() #:nodoc: + # Reset the namespace, so all tasks are automatically defined in the project's namespace. Rake.application.in_namespace ":#{name}" do # Everything we do inside the project is relative to its working directory. Dir.chdir(base_dir) { super } end end