diff --git a/lib/rake.rb b/lib/rake.rb
index aa446c48b..bf06d97c2 100644
--- a/lib/rake.rb
+++ b/lib/rake.rb
@@ -60,5 +60,6 @@
$trace = false
-# Alias FileList to be available at the top level.
+# Some top level Constants.
FileList = Rake::FileList
+RakeFileUtils = Rake::FileUtilsExt
diff --git a/lib/rake/file_utils_ext.rb b/lib/rake/file_utils_ext.rb
index 6904acd27..7c22f8068 100644
--- a/lib/rake/file_utils_ext.rb
+++ b/lib/rake/file_utils_ext.rb
@@ -1,9 +1,10 @@
require 'rake/file_utils'
module Rake
- # ###########################################################################
- # FileUtilsExt provides a custom version of the FileUtils methods that
- # respond to the verbose and nowrite commands.
+ #
+ # FileUtilsExt provides a custom version of the FileUtils methods
+ # that respond to the verbose and nowrite
+ # commands.
#
module FileUtilsExt
include FileUtils
@@ -37,14 +38,17 @@ def #{name}( *args, &block )
EOS
end
- # Get/set the verbose flag controlling output from the FileUtils utilities.
- # If verbose is true, then the utility method is echoed to standard output.
+ # Get/set the verbose flag controlling output from the FileUtils
+ # utilities. If verbose is true, then the utility method is
+ # echoed to standard output.
#
# Examples:
- # verbose # return the current value of the verbose flag
+ # verbose # return the current value of the
+ # # verbose flag
# verbose(v) # set the verbose flag to _v_.
- # verbose(v) { code } # Execute code with the verbose flag set temporarily to _v_.
- # # Return to the original value when code is done.
+ # verbose(v) { code } # Execute code with the verbose flag set
+ # # temporarily to _v_. Return to the
+ # # original value when code is done.
def verbose(value=nil)
oldvalue = FileUtilsExt.verbose_flag
FileUtilsExt.verbose_flag = value unless value.nil?
@@ -58,14 +62,17 @@ def verbose(value=nil)
FileUtilsExt.verbose_flag
end
- # Get/set the nowrite flag controlling output from the FileUtils utilities.
- # If verbose is true, then the utility method is echoed to standard output.
+ # Get/set the nowrite flag controlling output from the FileUtils
+ # utilities. If verbose is true, then the utility method is
+ # echoed to standard output.
#
# Examples:
- # nowrite # return the current value of the nowrite flag
+ # nowrite # return the current value of the
+ # # nowrite flag
# nowrite(v) # set the nowrite flag to _v_.
- # nowrite(v) { code } # Execute code with the nowrite flag set temporarily to _v_.
- # # Return to the original value when code is done.
+ # nowrite(v) { code } # Execute code with the nowrite flag set
+ # # temporarily to _v_. Return to the
+ # # original value when code is done.
def nowrite(value=nil)
oldvalue = FileUtilsExt.nowrite_flag
FileUtilsExt.nowrite_flag = value unless value.nil?
@@ -79,8 +86,8 @@ def nowrite(value=nil)
oldvalue
end
- # Use this function to prevent potentially destructive ruby code from
- # running when the :nowrite flag is set.
+ # Use this function to prevent potentially destructive ruby code
+ # from running when the :nowrite flag is set.
#
# Example:
#
@@ -88,9 +95,12 @@ def nowrite(value=nil)
# project.build
# end
#
- # The following code will build the project under normal conditions. If the
- # nowrite(true) flag is set, then the example will print:
+ # The following code will build the project under normal
+ # conditions. If the nowrite(true) flag is set, then the example
+ # will print:
+ #
# DRYRUN: Building Project
+ #
# instead of actually building the project.
#
def when_writing(msg=nil)
@@ -116,8 +126,9 @@ def rake_output_message(message)
$stderr.puts(message)
end
- # Check that the options do not contain options not listed in +optdecl+. An
- # ArgumentError exception is thrown if non-declared options are found.
+ # Check that the options do not contain options not listed in
+ # +optdecl+. An ArgumentError exception is thrown if non-declared
+ # options are found.
def rake_check_options(options, *optdecl)
h = options.dup
optdecl.each do |name|
@@ -128,5 +139,4 @@ def rake_check_options(options, *optdecl)
extend self
end
-
end