mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rake*: Updated to rake 0.9.3
* test/rake*: ditto * bin/rake: ditto * NEWS: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37664 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
bfc95c6e16
commit
9c66bad9f3
45 changed files with 1409 additions and 231 deletions
|
@ -52,8 +52,8 @@ module Rake
|
|||
|
||||
# Declare a file creation task.
|
||||
# (Mainly used for the directory command).
|
||||
def file_create(args, &block)
|
||||
Rake::FileCreationTask.define_task(args, &block)
|
||||
def file_create(*args, &block)
|
||||
Rake::FileCreationTask.define_task(*args, &block)
|
||||
end
|
||||
|
||||
# Declare a set of files tasks to create the given directories on
|
||||
|
@ -62,12 +62,15 @@ module Rake
|
|||
# Example:
|
||||
# directory "testdata/doc"
|
||||
#
|
||||
def directory(dir)
|
||||
def directory(*args, &block)
|
||||
result = file_create(*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
|
||||
result
|
||||
end
|
||||
|
||||
# Declare a task that performs its prerequisites in
|
||||
|
@ -78,8 +81,8 @@ module Rake
|
|||
# Example:
|
||||
# multitask :deploy => [:deploy_gem, :deploy_rdoc]
|
||||
#
|
||||
def multitask(args, &block)
|
||||
Rake::MultiTask.define_task(args, &block)
|
||||
def multitask(*args, &block)
|
||||
Rake::MultiTask.define_task(*args, &block)
|
||||
end
|
||||
|
||||
# Create a new rake namespace and use it for evaluating the given
|
||||
|
@ -167,10 +170,13 @@ module Rake
|
|||
private :#{name}
|
||||
}, __FILE__, line
|
||||
end
|
||||
end
|
||||
end unless defined? Rake::REDUCE_COMPAT
|
||||
|
||||
extend FileUtilsExt
|
||||
end
|
||||
|
||||
# Extend the main object with the DSL commands. This allows top-level
|
||||
# calls to task, etc. to work from a Rakefile without polluting the
|
||||
# object inheritance tree.
|
||||
self.extend Rake::DSL
|
||||
include Rake::DeprecatedObjectDSL
|
||||
include Rake::DeprecatedObjectDSL unless defined? Rake::REDUCE_COMPAT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue