Permalink
Browse files

directory DSL now behaves like other tasts

... where you can set dependencies and such
  • Loading branch information...
1 parent 3ce7534 commit b188607e410c8b02ba9bb638bf899eb960acb4e5 @zimbatm committed Aug 5, 2011
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/rake/dsl_definition.rb
@@ -62,12 +62,14 @@ def file_create(*args, &block)
# Example:
# directory "testdata/doc"
#
- def directory(dir)
+ def directory(*args, &block)
+ dir, _ = *Rake.application.resolve_args(args)
Rake.each_dir_parent(dir) do |d|
file_create d do |t|
mkdir_p t.name if ! File.exist?(t.name)
end
end
+ task(args, &block)
end
# Declare a task that performs its prerequisites in

0 comments on commit b188607

Please sign in to comment.