You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by as...@apache.org on 2009/07/02 19:50:30 UTC

svn commit: r790695 - in /buildr/trunk: CHANGELOG lib/buildr/core/project.rb

Author: assaf
Date: Thu Jul  2 17:50:30 2009
New Revision: 790695

URL: http://svn.apache.org/viewvc?rev=790695&view=rev
Log:
Fixed:  BUILDR-291 Local tasks do not support arguments (Ittay Dror).

Modified:
    buildr/trunk/CHANGELOG
    buildr/trunk/lib/buildr/core/project.rb

Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=790695&r1=790694&r2=790695&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Thu Jul  2 17:50:30 2009
@@ -7,6 +7,7 @@
 * Change: Updated to Rake 0.8.7, RSpec 1.2.6 and JRuby-openssl 0.5.1.
 * Fixed:  BUILDR-23 Support for setting file mode when packaging (Ittay Dror).
 * Fixed:  BUILDR-290 Dependencies cannot be downloaded over SSL.
+* Fixed:  BUILDR-291 Local tasks do not support arguments (Ittay Dror).
 
 1.3.4 (2009-04-21)
 * Added:  BUILDR-93 Add specs for ScalaCheck integration

Modified: buildr/trunk/lib/buildr/core/project.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/project.rb?rev=790695&r1=790694&r2=790695&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/project.rb (original)
+++ buildr/trunk/lib/buildr/core/project.rb Thu Jul  2 17:50:30 2009
@@ -317,11 +317,12 @@
       #
       # The optional block is called with the project name when the task executes
       # and returns a message that, for example "Building project #{name}".
-      def local_task(args, &block)
-        task args do |task|
+      def local_task(*args, &block)
+        task *args do |task, args|
+          args = task.arg_names.map {|n| args[n]}
           local_projects do |project|
             info block.call(project.name) if block
-            task("#{project.name}:#{task.name}").invoke
+            task("#{project.name}:#{task.name}").invoke *args
           end
         end
       end