aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rake/file_utils.rb
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-28 02:45:29 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-06-28 02:45:29 +0000
commit2619f216fef06c9fca948ca729a0e23b62996f09 (patch)
tree01c462490ba269df417fad115570ace6a765a25f /lib/rake/file_utils.rb
parent84ece951630c61eddab8be47b80fc1a7f774175f (diff)
downloadruby-2619f216fef06c9fca948ca729a0e23b62996f09.tar.gz
* lib/rake: Update rake to fix some bugs and hide deprecated features
from RDoc. * lib/rake/version.rb: Bump version to 0.9.2.1 to distinguish it from the released version. * NEWS: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rake/file_utils.rb')
-rw-r--r--lib/rake/file_utils.rb16
1 files changed, 9 insertions, 7 deletions
diff --git a/lib/rake/file_utils.rb b/lib/rake/file_utils.rb
index 9e0198e644..e02d541ab8 100644
--- a/lib/rake/file_utils.rb
+++ b/lib/rake/file_utils.rb
@@ -1,10 +1,9 @@
require 'rbconfig'
require 'fileutils'
-# ###########################################################################
+#--
# This a FileUtils extension that defines several additional commands to be
# added to the FileUtils utility functions.
-#
module FileUtils
# Path to the currently running Ruby program
RUBY = File.join(
@@ -38,6 +37,7 @@ module FileUtils
options[:noop] ||= Rake::FileUtilsExt.nowrite_flag
Rake.rake_check_options options, :noop, :verbose
Rake.rake_output_message cmd.join(" ") if options[:verbose]
+
unless options[:noop]
res = rake_system(*cmd)
status = $?
@@ -46,7 +46,7 @@ module FileUtils
end
end
- def create_shell_runner(cmd)
+ def create_shell_runner(cmd) # :nodoc:
show_command = cmd.join(" ")
show_command = show_command[0,42] + "..." unless $trace
lambda { |ok, status|
@@ -55,14 +55,16 @@ module FileUtils
end
private :create_shell_runner
- def set_verbose_option(options)
- if options[:verbose].nil?
- options[:verbose] = Rake::FileUtilsExt.verbose_flag.nil? || Rake::FileUtilsExt.verbose_flag
+ def set_verbose_option(options) # :nodoc:
+ unless options.key? :verbose
+ options[:verbose] =
+ Rake::FileUtilsExt.verbose_flag == Rake::FileUtilsExt::DEFAULT ||
+ Rake::FileUtilsExt.verbose_flag
end
end
private :set_verbose_option
- def rake_system(*cmd)
+ def rake_system(*cmd) # :nodoc:
Rake::AltSystem.system(*cmd)
end
private :rake_system