You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2012/11/01 01:07:32 UTC
svn commit: r1404426 - /buildr/trunk/lib/buildr/core/application.rb
Author: donaldp
Date: Thu Nov 1 00:07:31 2012
New Revision: 1404426
URL: http://svn.apache.org/viewvc?rev=1404426&view=rev
Log:
Introduce the same suppression of default logging for file operations through the Rake::DSL class. There has to be a better way of doing this
Modified:
buildr/trunk/lib/buildr/core/application.rb
Modified: buildr/trunk/lib/buildr/core/application.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/application.rb?rev=1404426&r1=1404425&r2=1404426&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/application.rb (original)
+++ buildr/trunk/lib/buildr/core/application.rb Thu Nov 1 00:07:31 2012
@@ -697,3 +697,21 @@ module RakeFileUtils #:nodoc:
EOS
end
end
+
+module Rake::DSL #:nodoc:
+ FileUtils::OPT_TABLE.each do |name, opts|
+ default_options = []
+ if opts.include?(:verbose) || opts.include?("verbose")
+ default_options << ':verbose => RakeFileUtils.verbose_flag == true'
+ end
+ next if default_options.empty?
+ module_eval(<<-EOS, __FILE__, __LINE__ + 1)
+ def #{name}( *args, &block )
+ super(
+ *rake_merge_option(args,
+ #{default_options.join(', ')}
+ ), &block)
+ end
+ EOS
+ end
+end