From 2365bd2a4ea303b6aa6a95cd1922392d38eefceb Mon Sep 17 00:00:00 2001 From: Eric Hodel Date: Fri, 7 Jan 2011 15:57:46 -0800 Subject: [PATCH] Remove trailing whitespace from rake --- README.rdoc | 8 +++--- Rakefile | 30 +++++++++++------------ doc/rakefile.rdoc | 16 ++++++------ doc/release_notes/rake-0.7.0.rdoc | 2 +- doc/release_notes/rake-0.7.2.rdoc | 6 ++--- doc/release_notes/rake-0.7.3.rdoc | 4 +-- doc/release_notes/rake-0.8.0.rdoc | 2 +- doc/release_notes/rake-0.8.2.rdoc | 2 +- doc/release_notes/rake-0.8.3.rdoc | 2 +- doc/release_notes/rake-0.8.4.rdoc | 2 +- doc/release_notes/rake-0.8.5.rdoc | 2 +- doc/release_notes/rake-0.8.6.rdoc | 2 +- doc/release_notes/rake-0.8.7.rdoc | 2 +- install.rb | 4 +-- lib/rake/alt_system.rb | 10 ++++---- lib/rake/application.rb | 14 +++++------ lib/rake/clean.rb | 10 ++++---- lib/rake/contrib/publisher.rb | 2 +- lib/rake/contrib/sshpublisher.rb | 8 +++--- lib/rake/contrib/sys.rb | 2 +- lib/rake/dsl_definition.rb | 20 +++++++-------- lib/rake/environment.rb | 2 +- lib/rake/ext/string.rb | 2 +- lib/rake/file_list.rb | 4 +-- lib/rake/file_utils_ext.rb | 24 +++++++++--------- lib/rake/invocation_chain.rb | 4 +-- lib/rake/name_space.rb | 2 +- lib/rake/pseudo_status.rb | 2 +- lib/rake/rdoctask.rb | 30 +++++++++++------------ lib/rake/task.rb | 8 +++--- lib/rake/task_arguments.rb | 4 +-- lib/rake/task_manager.rb | 18 +++++++------- lib/rake/testtask.rb | 8 +++--- rakelib/rbx.rake | 2 +- rakelib/ruby19.rake | 2 +- test/functional/session_based_tests.rb | 20 +++++++-------- test/lib/application_test.rb | 34 +++++++++++++------------- test/lib/definitions_test.rb | 4 +-- test/lib/earlytime_test.rb | 2 +- test/lib/file_task_test.rb | 2 +- test/lib/filelist_test.rb | 22 ++++++++--------- test/lib/multitask_test.rb | 2 +- test/lib/pathmap_test.rb | 2 +- test/lib/rake_test.rb | 2 +- test/lib/rdoc_task_test.rb | 24 +++++++++--------- test/lib/task_arguments_test.rb | 2 +- test/lib/task_manager_test.rb | 4 +-- test/lib/test_task_test.rb | 2 +- 48 files changed, 192 insertions(+), 192 deletions(-) diff --git a/README.rdoc b/README.rdoc index 7b8ec9a67..9f5b67404 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,9 +1,9 @@ -= RAKE -- Ruby Make += RAKE -- Ruby Make Supporting Rake version: 0.8.7. This package contains Rake, a simple ruby build program with -capabilities similar to make. +capabilities similar to make. Rake has the following features: @@ -52,7 +52,7 @@ First, you must write a "Rakefile" file which contains the build rules. Here's a simple example: task :default => [:test] - + task :test do ruby "test/unittest.rb" end @@ -114,7 +114,7 @@ If you wish to run the unit and functional tests that come with Rake: Feature requests and bug reports can be made here * http://onestepback.org/cgi-bin/bugs.cgi?project=rake - + No account is needed for posting requests. Or you can send me an email (at jim dot weirich at gmail dot com) diff --git a/Rakefile b/Rakefile index 3424aa73a..8bbb8bc5b 100644 --- a/Rakefile +++ b/Rakefile @@ -73,19 +73,19 @@ namespace :test do t.libs << "." t.warning = true end - + Rake::TestTask.new(:units) do |t| t.test_files = TestFiles::UNIT t.libs << "." t.warning = true end - + Rake::TestTask.new(:functional) do |t| t.test_files = TestFiles::FUNCTIONAL t.libs << "." t.warning = true end - + Rake::TestTask.new(:contribs) do |t| t.test_files = TestFiles::CONTRIB t.libs << "." @@ -98,10 +98,10 @@ begin Rcov::RcovTask.new do |t| t.libs << "test" - dot_rakes = + dot_rakes = t.rcov_opts = [ '-xRakefile', '-xrakefile', '-xpublish.rf', - '-xlib/rake/contrib', '-x/Library', + '-xlib/rake/contrib', '-x/Library', '--text-report', '--sort coverage' ] + FileList['rakelib/*.rake'].pathmap("-x%p") @@ -152,7 +152,7 @@ rd = Rake::RDocTask.new("rdoc") do |rdoc| rdoc.title = "Rake -- Ruby Make" rdoc.options = BASE_RDOC_OPTIONS.dup rdoc.options << '-SHN' << '-f' << 'darkfish' if DARKFISH_ENABLED - + rdoc.rdoc_files.include('README.rdoc', 'MIT-LICENSE', 'TODO', 'CHANGES') rdoc.rdoc_files.include('lib/**/*.rb', 'doc/**/*.rdoc') rdoc.rdoc_files.exclude(/\bcontrib\b/) @@ -165,8 +165,8 @@ end PKG_FILES = FileList[ 'install.rb', '[A-Z]*', - 'bin/**/*', - 'lib/**/*.rb', + 'bin/**/*', + 'lib/**/*.rb', 'test/**/*.rb', 'test/**/*.rf', 'test/**/*.mf', @@ -182,7 +182,7 @@ if ! defined?(Gem) puts "Package Target requires RubyGEMs" else SPEC = Gem::Specification.new do |s| - + #### Basic information. s.name = 'rake' @@ -190,7 +190,7 @@ else s.summary = "Ruby based make-like utility." s.description = <<-EOF Rake is a Make-like program implemented in Ruby. Tasks - and dependencies are specified in standard Ruby syntax. + and dependencies are specified in standard Ruby syntax. EOF #### Dependencies and requirements. @@ -295,7 +295,7 @@ task :todo do end desc "List all ruby files" -task :rubyfiles do +task :rubyfiles do puts RUBY_FILES puts FileList['bin/*'].exclude('bin/*.rb') end @@ -321,23 +321,23 @@ task :release, :rel, :reuse, :reltest, :package, :tag ] do - announce + announce announce "**************************************************************" announce "* Release #{$package_version} Complete." announce "* Packages ready to upload." announce "**************************************************************" - announce + announce end # Validate that everything is ready to go for a release. task :prerelease, :rel, :reuse, :reltest do |t, args| $package_version = args.rel - announce + announce announce "**************************************************************" announce "* Making RubyGem Release #{$package_version}" announce "* (current version #{CURRENT_VERSION})" announce "**************************************************************" - announce + announce # Is a release number supplied? unless args.rel diff --git a/doc/rakefile.rdoc b/doc/rakefile.rdoc index ac35b24a5..4fdf3adeb 100644 --- a/doc/rakefile.rdoc +++ b/doc/rakefile.rdoc @@ -278,7 +278,7 @@ actions. task :dont do Rake::Task[:doit].clear - end + end Running this example: @@ -287,7 +287,7 @@ Running this example: DONE $ rake dont doit (in /Users/jim/working/git/rake/x) - $ + $ The ability to programmatically manipulate tasks gives rake very powerful meta-programming capabilities w.r.t. task execution, but @@ -312,7 +312,7 @@ Rake is able to find a file named "mycode.c", it will automatically create a task that builds "mycode.o" from "mycode.c". If the file "mycode.c" does not exist, rake will attempt -to recursively synthesize a rule for it. +to recursively synthesize a rule for it. When a task is synthesized from a rule, the +source+ attribute of the task is set to the matching source file. This allows us to write @@ -330,7 +330,7 @@ The following rule is equivalent to the example above. proc {|task_name| task_name.sub(/\.[^.]+$/, '.c') } ]) do |t| sh "cc #{t.source} -c -o #{t.name}" - end + end NOTE: Because of a _quirk_ in Ruby syntax, parenthesis are required on *rule* when the first argument is a regular expression. @@ -340,7 +340,7 @@ The following rule might be used for Java files ... rule '.java' => [ proc { |tn| tn.sub(/\.class$/, '.java').sub(/^classes\//, 'src/') } ] do |t| - java_compile(t.source, t.name) + java_compile(t.source, t.name) end NOTE: +java_compile+ is a hypothetical method that invokes the @@ -400,14 +400,14 @@ are allowed === Example: desc 'Create a distribution package' - + task :package => [ ... ] do ... end The +desc+ comment takes priority over the comment for of description. The "-T" switch (or "--tasks" if you like to spell things out) will display a list of tasks that have a description. If you use -comments or +desc+ to describe your major tasks, you have a +comments or +desc+ to describe your major tasks, you have a semi-automatic way of generating a summary of your Rake file. traken$ rake -T @@ -461,7 +461,7 @@ Nested namespaces are supported, so Note that the name given in the +task+ command is always the unadorned task name without any namespace prefixes. The +task+ command always -defines a task in the current namespace. +defines a task in the current namespace. === FileTasks diff --git a/doc/release_notes/rake-0.7.0.rdoc b/doc/release_notes/rake-0.7.0.rdoc index 9c07c7f58..b8bf56ebb 100644 --- a/doc/release_notes/rake-0.7.0.rdoc +++ b/doc/release_notes/rake-0.7.0.rdoc @@ -64,7 +64,7 @@ commands: Or invoke both via the :build_all command: - rake build_all + rake build_all Namespaces may be nested arbitrarily. Since the name of file tasks correspond to the name of a file in the external file system, diff --git a/doc/release_notes/rake-0.7.2.rdoc b/doc/release_notes/rake-0.7.2.rdoc index 2cc86becc..ec99ee0c0 100644 --- a/doc/release_notes/rake-0.7.2.rdoc +++ b/doc/release_notes/rake-0.7.2.rdoc @@ -24,7 +24,7 @@ Rake: appliation instead of using its own data. * Fixed the method name leak from FileUtils (bug found by Glenn - Vanderburg). + Vanderburg). * Added test for noop, bad_option and verbose flags to sh command. @@ -40,13 +40,13 @@ Rake: The following new features are available in Rake version 0.7.2: * Added square and curly bracket patterns to FileList#include (Tilman - Sauerbeck). + Sauerbeck). * FileLists can now pass a block to FileList#exclude to exclude files based on calculated values. * Added plain filename support to rule dependents (suggested by Nobu - Nakada). + Nakada). * Added pathmap support to rule dependents. In other words, if a pathmap format (beginning with a '%') is given as a Rake rule diff --git a/doc/release_notes/rake-0.7.3.rdoc b/doc/release_notes/rake-0.7.3.rdoc index 39e91bb98..7e9f92198 100755 --- a/doc/release_notes/rake-0.7.3.rdoc +++ b/doc/release_notes/rake-0.7.3.rdoc @@ -13,11 +13,11 @@ support custom Rake applications. require 'rake' Rake.application.init('myrake') - + task :default do something_interesting end - + Rake.application.top_level == What is Rake diff --git a/doc/release_notes/rake-0.8.0.rdoc b/doc/release_notes/rake-0.8.0.rdoc index 05e5877f6..4fc7fdd7b 100644 --- a/doc/release_notes/rake-0.8.0.rdoc +++ b/doc/release_notes/rake-0.8.0.rdoc @@ -1,7 +1,7 @@ = Rake 0.8.0/0.8.1 Released Rake version 0.8.0 is a new release of rake that includes serveral new -features. +features. == Changes diff --git a/doc/release_notes/rake-0.8.2.rdoc b/doc/release_notes/rake-0.8.2.rdoc index cfb994189..6119a5984 100644 --- a/doc/release_notes/rake-0.8.2.rdoc +++ b/doc/release_notes/rake-0.8.2.rdoc @@ -53,7 +53,7 @@ new features and numerous bug fixes. * Changed from using Mutex to Monitor. Evidently Mutex causes thread join errors when Ruby is compiled with -disable-pthreads. (Patch - supplied by Ittay Dror) + supplied by Ittay Dror) * Fixed bug in makefile parser that had problems with extra spaces in file task names. (Patch supplied by Ittay Dror) diff --git a/doc/release_notes/rake-0.8.3.rdoc b/doc/release_notes/rake-0.8.3.rdoc index fefc8c073..3ee38ccb6 100644 --- a/doc/release_notes/rake-0.8.3.rdoc +++ b/doc/release_notes/rake-0.8.3.rdoc @@ -12,7 +12,7 @@ Rake version 0.8.3 is a bug-fix release of rake. directory. * Added fix to handle ruby installations in directories with spaces in - their name. + their name. == What is Rake diff --git a/doc/release_notes/rake-0.8.4.rdoc b/doc/release_notes/rake-0.8.4.rdoc index 8ccb1abc2..d27de8b27 100644 --- a/doc/release_notes/rake-0.8.4.rdoc +++ b/doc/release_notes/rake-0.8.4.rdoc @@ -69,7 +69,7 @@ Otherwise, you can get it from the more traditional places: Home Page:: http://rake.rubyforge.org/ Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git +GitHub:: git://github.com/jimweirich/rake.git == Task Argument Examples diff --git a/doc/release_notes/rake-0.8.5.rdoc b/doc/release_notes/rake-0.8.5.rdoc index 9c828cef8..0ee2583dd 100644 --- a/doc/release_notes/rake-0.8.5.rdoc +++ b/doc/release_notes/rake-0.8.5.rdoc @@ -39,7 +39,7 @@ Otherwise, you can get it from the more traditional places: Home Page:: http://rake.rubyforge.org/ Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git +GitHub:: git://github.com/jimweirich/rake.git == Thanks diff --git a/doc/release_notes/rake-0.8.6.rdoc b/doc/release_notes/rake-0.8.6.rdoc index e1031ad33..476446077 100644 --- a/doc/release_notes/rake-0.8.6.rdoc +++ b/doc/release_notes/rake-0.8.6.rdoc @@ -41,7 +41,7 @@ Otherwise, you can get it from the more traditional places: Home Page:: http://rake.rubyforge.org/ Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git +GitHub:: git://github.com/jimweirich/rake.git == Thanks diff --git a/doc/release_notes/rake-0.8.7.rdoc b/doc/release_notes/rake-0.8.7.rdoc index fb0c5d4e3..884f4c659 100644 --- a/doc/release_notes/rake-0.8.7.rdoc +++ b/doc/release_notes/rake-0.8.7.rdoc @@ -42,7 +42,7 @@ Otherwise, you can get it from the more traditional places: Home Page:: http://rake.rubyforge.org/ Download:: http://rubyforge.org/project/showfiles.php?group_id=50 -GitHub:: git://github.com/jimweirich/rake.git +GitHub:: git://github.com/jimweirich/rake.git == Thanks diff --git a/install.rb b/install.rb index 1db443fae..f5e84c391 100644 --- a/install.rb +++ b/install.rb @@ -27,7 +27,7 @@ def installBIN(from, opfile) fail "Cannot find a temporary directory" unless tmp_dir tmp_file = File.join(tmp_dir, "_tmp") - + File.open(from) do |ip| File.open(tmp_file, "w") do |op| ruby = File.join($realbindir, $ruby) @@ -62,7 +62,7 @@ def installBIN(from, opfile) if (destdir = ENV['DESTDIR']) $bindir = destdir + $bindir $sitedir = destdir + $sitedir - + FileUtils.mkdir_p($bindir) FileUtils.mkdir_p($sitedir) end diff --git a/lib/rake/alt_system.rb b/lib/rake/alt_system.rb index b0b799cfe..b7f967a03 100644 --- a/lib/rake/alt_system.rb +++ b/lib/rake/alt_system.rb @@ -1,6 +1,6 @@ # # Copyright (c) 2008 James M. Lawrence -# +# # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, @@ -8,10 +8,10 @@ # publish, distribute, sublicense, and/or sell copies of the Software, # and to permit persons to whom the Software is furnished to do so, # subject to the following conditions: -# +# # The above copyright notice and this permission notice shall be # included in all copies or substantial portions of the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND @@ -27,7 +27,7 @@ # # Alternate implementations of system() and backticks `` on Windows # for ruby-1.8 and earlier. -# +# module Rake::AltSystem WINDOWS = RbConfig::CONFIG["host_os"] =~ %r!(msdos|mswin|djgpp|mingw)! @@ -37,7 +37,7 @@ def define_module_function(name, &block) module_function(name) end end - + if WINDOWS and RUBY_VERSION < "1.9.0" RUNNABLE_EXTS = %w[com exe bat cmd] RUNNABLE_PATTERN = %r!\.(#{RUNNABLE_EXTS.join('|')})\Z!i diff --git a/lib/rake/application.rb b/lib/rake/application.rb index 795839d90..f919c6c3b 100644 --- a/lib/rake/application.rb +++ b/lib/rake/application.rb @@ -5,7 +5,7 @@ require 'rake/win32' module Rake - + ###################################################################### # Rake main application object. When invoking +rake+ from the # command line, a Rake::Application object is created and run. @@ -232,7 +232,7 @@ def terminal_width 80 end - # Calculate the dynamic width of the + # Calculate the dynamic width of the def dynamic_width @dynamic_width ||= (dynamic_width_stty.nonzero? || dynamic_width_tput) end @@ -248,7 +248,7 @@ def dynamic_width_tput def unix? RbConfig::CONFIG['host_os'] =~ /(aix|darwin|linux|(net|free|open)bsd|cygwin|solaris|irix|hpux)/i end - + def windows? Win32.windows? end @@ -308,7 +308,7 @@ def standard_rake_options ], ['--execute-continue', '-E CODE', "Execute some Ruby code, then continue with normal task processing.", - lambda { |value| eval(value) } + lambda { |value| eval(value) } ], ['--libdir', '-I LIBDIR', "Include LIBDIR in the search path for required modules.", lambda { |value| $:.push(value) } @@ -320,9 +320,9 @@ def standard_rake_options lambda { |value| Rake.verbose(false) } ], ['--rakefile', '-f [FILE]', "Use FILE as the rakefile.", - lambda { |value| + lambda { |value| value ||= '' - @rakefiles.clear + @rakefiles.clear @rakefiles << value } ], @@ -509,7 +509,7 @@ def system_dir end end end - + # The standard directory containing system wide rake files. if Win32.windows? def standard_system_dir #:nodoc: diff --git a/lib/rake/clean.rb b/lib/rake/clean.rb index ba461c9b5..e42c73c0a 100644 --- a/lib/rake/clean.rb +++ b/lib/rake/clean.rb @@ -17,17 +17,17 @@ Rake::DSL.environment do CLEAN = Rake::FileList["**/*~", "**/*.bak", "**/core"] - CLEAN.clear_exclude.exclude { |fn| - fn.pathmap("%f") == 'core' && File.directory?(fn) + CLEAN.clear_exclude.exclude { |fn| + fn.pathmap("%f") == 'core' && File.directory?(fn) } - + desc "Remove any temporary products." task :clean do CLEAN.each { |fn| rm_r fn rescue nil } end - + CLOBBER = Rake::FileList.new - + desc "Remove any generated file." task :clobber => [:clean] do CLOBBER.each { |fn| rm_r fn rescue nil } diff --git a/lib/rake/contrib/publisher.rb b/lib/rake/contrib/publisher.rb index b78573582..356c158bb 100644 --- a/lib/rake/contrib/publisher.rb +++ b/lib/rake/contrib/publisher.rb @@ -9,7 +9,7 @@ # application. The application name (APP) is appended to # this directory before using. # * pkgdir :: Directory on the host system where packages can be -# placed. +# placed. HostInfo = Struct.new(:name, :webdir, :pkgdir) # Manage several publishers as a single entity. diff --git a/lib/rake/contrib/sshpublisher.rb b/lib/rake/contrib/sshpublisher.rb index d77fcc377..15158bb88 100644 --- a/lib/rake/contrib/sshpublisher.rb +++ b/lib/rake/contrib/sshpublisher.rb @@ -12,12 +12,12 @@ def initialize(host, remote_dir, local_dir) @remote_dir = remote_dir @local_dir = local_dir end - + def upload sh %{scp -rq #{@local_dir}/* #{@host}:#{@remote_dir}} end end - + # Publish an entire directory to a fresh remote directory using SSH. class SshFreshDirPublisher < SshDirPublisher def upload @@ -26,7 +26,7 @@ def upload super end end - + # Publish a list of files to an existing remote directory. class SshFilePublisher # Create a publisher using the give host information. @@ -36,7 +36,7 @@ def initialize(host, remote_dir, local_dir, *files) @local_dir = local_dir @files = files end - + # Upload the local directory to the remote directory. def upload @files.each do |fn| diff --git a/lib/rake/contrib/sys.rb b/lib/rake/contrib/sys.rb index b89bdb86b..d1c4ff3f7 100644 --- a/lib/rake/contrib/sys.rb +++ b/lib/rake/contrib/sys.rb @@ -42,7 +42,7 @@ def run(cmd) def ruby(*args) run "#{RUBY} #{args.join(' ')}" end - + # Copy a single file from +file_name+ to +dest_file+. def copy(file_name, dest_file) log "Copying file #{file_name} to #{dest_file}" diff --git a/lib/rake/dsl_definition.rb b/lib/rake/dsl_definition.rb index 2c0147609..b098036fe 100644 --- a/lib/rake/dsl_definition.rb +++ b/lib/rake/dsl_definition.rb @@ -7,7 +7,7 @@ module DSL # Include the FileUtils file manipulation functions in the top # level module, but mark them private so that they don't # unintentionally define methods on other objects. - + include FileUtilsExt private(*FileUtils.instance_methods(false)) private(*FileUtilsExt.instance_methods(false)) @@ -22,8 +22,8 @@ module DSL def task(*args, &block) Rake::Task.define_task(*args, &block) end - - + + # Declare a file task. # # Example: @@ -40,13 +40,13 @@ def task(*args, &block) def file(*args, &block) Rake::FileTask.define_task(*args, &block) end - + # Declare a file creation task. # (Mainly used for the directory command). def file_create(args, &block) Rake::FileCreationTask.define_task(args, &block) end - + # Declare a set of files tasks to create the given directories on # demand. # @@ -60,7 +60,7 @@ def directory(dir) end end end - + # Declare a task that performs its prerequisites in # parallel. Multitasks does *not* guarantee that its prerequisites # will execute in any given order (which is obvious when you think @@ -72,7 +72,7 @@ def directory(dir) def multitask(args, &block) Rake::MultiTask.define_task(args, &block) end - + # Create a new rake namespace and use it for evaluating the given # block. Returns a NameSpace object that can be used to lookup # tasks defined in the namespace. @@ -92,7 +92,7 @@ def namespace(name=nil, &block) end Rake.application.in_namespace(name, &block) end - + # Declare a rule for auto-tasks. # # Example: @@ -103,7 +103,7 @@ def namespace(name=nil, &block) def rule(*args, &block) Rake::Task.create_rule(*args, &block) end - + # Describe the next rake task. # # Example: @@ -115,7 +115,7 @@ def rule(*args, &block) def desc(description) Rake.application.last_description = description end - + # Import the partial Rakefiles +fn+. Imported files are loaded # _after_ the current file is completely loaded. This allows the # import statement to appear anywhere in the importing file, and yet diff --git a/lib/rake/environment.rb b/lib/rake/environment.rb index 4a7686313..e33ad0c67 100644 --- a/lib/rake/environment.rb +++ b/lib/rake/environment.rb @@ -37,4 +37,4 @@ def DSL.environment(&block) end end - + diff --git a/lib/rake/ext/string.rb b/lib/rake/ext/string.rb index 293b7950e..d271965b8 100644 --- a/lib/rake/ext/string.rb +++ b/lib/rake/ext/string.rb @@ -44,7 +44,7 @@ def pathmap_partial(n) File.join(partial_dirs) end protected :pathmap_partial - + # Preform the pathmap replacement operations on the given path. The # patterns take the form 'pat1,rep1;pat2,rep2...'. def pathmap_replace(patterns, &block) diff --git a/lib/rake/file_list.rb b/lib/rake/file_list.rb index a4f23d48a..da830b9be 100644 --- a/lib/rake/file_list.rb +++ b/lib/rake/file_list.rb @@ -305,7 +305,7 @@ def egrep(pattern, *options) end matched end - + # Return a new file list that only contains file names from the current # file list that exist on the file system. def existing @@ -383,7 +383,7 @@ def [](*args) new(*args) end end - end + end end module Rake diff --git a/lib/rake/file_utils_ext.rb b/lib/rake/file_utils_ext.rb index ad69171f8..40fe5ac3d 100644 --- a/lib/rake/file_utils_ext.rb +++ b/lib/rake/file_utils_ext.rb @@ -7,16 +7,16 @@ module Rake # module FileUtilsExt include FileUtils - + class << self attr_accessor :verbose_flag, :nowrite_flag end FileUtilsExt.verbose_flag = nil FileUtilsExt.nowrite_flag = false - + $fileutils_verbose = true $fileutils_nowrite = false - + FileUtils::OPT_TABLE.each do |name, opts| default_options = [] if opts.include?(:verbose) || opts.include?("verbose") @@ -25,7 +25,7 @@ class << self if opts.include?(:noop) || opts.include?("noop") default_options << ':noop => FileUtilsExt.nowrite_flag' end - + next if default_options.empty? module_eval(<<-EOS, __FILE__, __LINE__ + 1) def #{name}( *args, &block ) @@ -36,7 +36,7 @@ def #{name}( *args, &block ) end 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. # @@ -57,7 +57,7 @@ def verbose(value=nil) end 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. # @@ -78,7 +78,7 @@ def nowrite(value=nil) end oldvalue end - + # Use this function to prevent protentially destructive ruby code from # running when the :nowrite flag is set. # @@ -100,7 +100,7 @@ def when_writing(msg=nil) yield end end - + # Merge the given options with the default values. def rake_merge_option(args, defaults) if Hash === args.last @@ -110,12 +110,12 @@ def rake_merge_option(args, defaults) args.push defaults args end - + # Send the message to the default rake output (which is $stderr). 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. def rake_check_options(options, *optdecl) @@ -125,8 +125,8 @@ def rake_check_options(options, *optdecl) end raise ArgumentError, "no such option: #{h.keys.join(' ')}" unless h.empty? end - + extend self end - + end diff --git a/lib/rake/invocation_chain.rb b/lib/rake/invocation_chain.rb index a2c858589..8a01ab4c2 100644 --- a/lib/rake/invocation_chain.rb +++ b/lib/rake/invocation_chain.rb @@ -1,5 +1,5 @@ module Rake - + #################################################################### # InvocationChain tracks the chain of task invocations to detect # circular dependencies. @@ -47,5 +47,5 @@ def to_s end EMPTY = EmptyInvocationChain.new - end + end end diff --git a/lib/rake/name_space.rb b/lib/rake/name_space.rb index 073285468..e1cc0940b 100644 --- a/lib/rake/name_space.rb +++ b/lib/rake/name_space.rb @@ -1,5 +1,5 @@ module Rake - + # The NameSpace class will lookup task names in the the scope # defined by a +namespace+ command. # diff --git a/lib/rake/pseudo_status.rb b/lib/rake/pseudo_status.rb index 8ce050309..b58df3da1 100644 --- a/lib/rake/pseudo_status.rb +++ b/lib/rake/pseudo_status.rb @@ -1,5 +1,5 @@ module Rake - + #################################################################### # Exit status class for times the system just gives us a nil. class PseudoStatus diff --git a/lib/rake/rdoctask.rb b/lib/rake/rdoctask.rb index 660f3a2f0..8050afce7 100644 --- a/lib/rake/rdoctask.rb +++ b/lib/rake/rdoctask.rb @@ -11,7 +11,7 @@ module Rake # The RDocTask will create the following targets: # # [rdoc] - # Main task for this RDOC task. + # Main task for this RDOC task. # # [:clobber_rdoc] # Delete all the rdoc files. This target is automatically @@ -44,7 +44,7 @@ module Rake # end # # The tasks would then be named :rdoc_dev, :clobber_rdoc_dev, and - # :rerdoc_dev. + # :rerdoc_dev. # # If you wish to have completely different task names, then pass a Hash as # first argument. With the :rdoc, :clobber_rdoc and @@ -81,7 +81,7 @@ class RDocTask < TaskLib # Whether to run the rdoc process as an external shell (default is false) attr_accessor :external - + attr_accessor :inline_source # Create an RDoc task with the given name. See the RDocTask class overview @@ -93,7 +93,7 @@ def initialize(name = :rdoc) # :yield: self raise ArgumentError, "Invalid option(s) passed to RDocTask.new: #{invalid_options.join(", ")}" end end - + @name = name @rdoc_files = Rake::FileList.new @rdoc_dir = 'html' @@ -106,7 +106,7 @@ def initialize(name = :rdoc) # :yield: self yield self if block_given? define end - + # Create the tasks defined by this task lib. def define if rdoc_task_name != "rdoc" @@ -115,17 +115,17 @@ def define desc "Build the #{rdoc_task_name} HTML Files" end task rdoc_task_name - + desc "Force a rebuild of the RDOC files" task rerdoc_task_name => [clobber_task_name, rdoc_task_name] - - desc "Remove rdoc products" + + desc "Remove rdoc products" task clobber_task_name do rm_r rdoc_dir rescue nil end - + task :clobber => [clobber_task_name] - + directory @rdoc_dir task rdoc_task_name => [rdoc_target] file rdoc_target => @rdoc_files + [Rake.application.rakefile] do @@ -164,7 +164,7 @@ def quote(str) def option_string option_list.join(' ') end - + # The block passed to this method will be called just before running the # RDoc generator. It is allowed to modify RDocTask attributes inside the # block. @@ -173,11 +173,11 @@ def before_running_rdoc(&block) end private - + def rdoc_target "#{rdoc_dir}/index.html" end - + def rdoc_task_name case name when Hash @@ -186,7 +186,7 @@ def rdoc_task_name name.to_s end end - + def clobber_task_name case name when Hash @@ -195,7 +195,7 @@ def clobber_task_name "clobber_#{name}" end end - + def rerdoc_task_name case name when Hash diff --git a/lib/rake/task.rb b/lib/rake/task.rb index 10cd204e6..21f39558e 100644 --- a/lib/rake/task.rb +++ b/lib/rake/task.rb @@ -1,7 +1,7 @@ require 'rake/invocation_exception_mixin' module Rake - + # ######################################################################### # A Task is the basic unit of work in a Rakefile. Tasks have associated # actions (possibly more than one) and a list of prerequisites. When @@ -50,12 +50,12 @@ def inspect def sources @sources ||= [] end - + # List of prerequisite tasks def prerequisite_tasks prerequisites.collect { |pre| lookup_prerequisite(pre) } end - + def lookup_prerequisite(prerequisite_name) application[prerequisite_name, @scope] end @@ -65,7 +65,7 @@ def lookup_prerequisite(prerequisite_name) def source @sources.first if defined?(@sources) end - + # Create a task named +task_name+ with no actions or prerequisites. Use # +enhance+ to add actions and prerequisites. def initialize(task_name, app) diff --git a/lib/rake/task_arguments.rb b/lib/rake/task_arguments.rb index 39fe3e781..f22c87e19 100644 --- a/lib/rake/task_arguments.rb +++ b/lib/rake/task_arguments.rb @@ -58,9 +58,9 @@ def to_s def inspect to_s end - + protected - + def lookup(name) if @hash.has_key?(name) @hash[name] diff --git a/lib/rake/task_manager.rb b/lib/rake/task_manager.rb index 2d27e5c43..ba40b1713 100644 --- a/lib/rake/task_manager.rb +++ b/lib/rake/task_manager.rb @@ -84,7 +84,7 @@ def resolve_args_without_dependencies(args) [task_name, arg_names, []] end private :resolve_args_without_dependencies - + # Resolve task arguments for a task or rule when there are # dependencies declared. # @@ -115,7 +115,7 @@ def resolve_args_with_dependencies(args, hash) # :nodoc: [task_name, arg_names, deps] end private :resolve_args_with_dependencies - + # If a rule can be found that matches the task name, enhance the # task with the prerequisites and actions from the rule. Set the # source attribute of the task appropriately for the rule. Return @@ -207,14 +207,14 @@ def in_namespace(name) end private - + # Add a location to the locations field of the given task. def add_location(task) loc = find_location task.locations << loc if loc task end - + # Find the location that called into the dsl layer. def find_location locations = caller @@ -225,7 +225,7 @@ def find_location end nil end - + # Generate an anonymous namespace name. def generate_name @seed ||= 0 @@ -285,8 +285,8 @@ def make_sources(task_name, extensions) end - private - + private + # Return the current description. If there isn't one, try to find it # by reading in the source file and looking for a comment immediately # prior to the task definition @@ -295,14 +295,14 @@ def get_description(task) @last_description = nil desc end - + def find_preceding_comment_for_task(task) loc = task.locations.last file_name, line = parse_location(loc) return nil unless file_name comment_from_file(file_name, line) end - + def parse_location(loc) if loc =~ /^(.*):(\d+)/ [ $1, Integer($2) ] diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb index 8278e8cdb..afcfe3d1f 100644 --- a/lib/rake/testtask.rb +++ b/lib/rake/testtask.rb @@ -10,7 +10,7 @@ module Rake # Create a task that runs a set of tests. # # Example: - # + # # Rake::TestTask.new do |t| # t.libs << "test" # t.test_files = FileList['test/test*.rb'] @@ -63,7 +63,7 @@ class TestTask < TaskLib # * :rake -- Rake provided test loading script (default). # * :testrb -- Ruby provided test loading script. # * :direct -- Load tests using command line loader. - # + # attr_accessor :loader # Array of commandline options to pass to ruby when running test loader. @@ -118,7 +118,7 @@ def ruby_opts_string def lib_path @libs.join(File::PATH_SEPARATOR) end - + def file_list_string file_list.collect { |fn| "\"#{fn}\"" }.join(' ') end @@ -170,7 +170,7 @@ def find_file(fn) # :nodoc: end nil end - + def rake_lib_dir # :nodoc: find_dir('rake') or fail "unable to find rake lib" diff --git a/rakelib/rbx.rake b/rakelib/rbx.rake index c5ba10918..8791dbbb3 100644 --- a/rakelib/rbx.rake +++ b/rakelib/rbx.rake @@ -38,7 +38,7 @@ namespace "rbx" do task :check_svn do fail "Cannot find Ruby 1.9 SVN directory: #{Rbx::SVN}" unless - File.directory?(Rbx::SVN) + File.directory?(Rbx::SVN) end diff --git a/rakelib/ruby19.rake b/rakelib/ruby19.rake index 8bbd8015c..36f60964c 100644 --- a/rakelib/ruby19.rake +++ b/rakelib/ruby19.rake @@ -44,7 +44,7 @@ namespace "ruby19" do task :check_svn do fail "Cannot find Ruby 1.9 SVN directory: #{Ruby19::SVN}" unless - File.directory?(Ruby19::SVN) + File.directory?(Ruby19::SVN) end diff --git a/test/functional/session_based_tests.rb b/test/functional/session_based_tests.rb index 9e461afd7..521aedea7 100644 --- a/test/functional/session_based_tests.rb +++ b/test/functional/session_based_tests.rb @@ -80,7 +80,7 @@ def test_multi_desc assert_no_match %r{^rake c}, @out assert_match %r{^rake d *# x{65}\.\.\.$}, @out end - + def test_long_description in_environment("PWD" => "test/data/multidesc") do rake "--describe" @@ -341,7 +341,7 @@ def test_file_task_are_not_scoped_by_namespaces assert_match(/^XYZ1\nXYZ2$/m, @out) end end - + def test_file_task_dependencies_scoped_by_namespaces in_environment("PWD" => "test/data/namespace") do rake "scopedep.rb" @@ -350,7 +350,7 @@ def test_file_task_dependencies_scoped_by_namespaces ensure remove_namespace_files end - + def test_rake_returns_status_error_values in_environment("PWD" => "test/data/statusreturn") do rake "exit5" @@ -371,7 +371,7 @@ def test_comment_before_task_acts_like_desc end assert_match("comment for t1", @out) end - + def test_comment_separated_from_task_by_blank_line_is_not_picked_up Dir.chdir("test/data/comments") { rake("-T")} assert_not_match("t2", @out) @@ -381,35 +381,35 @@ def test_comment_after_desc_is_ignored Dir.chdir("test/data/comments") { rake("-T")} assert_match("override comment for t3", @out) end - + def test_comment_before_desc_is_ignored Dir.chdir("test/data/comments") { rake("-T")} assert_match("override comment for t4", @out) end - + def test_correct_number_of_tasks_reported Dir.chdir("test/data/comments") { rake("-T")} assert_equal(3, @out.split(/\n/).grep(/t\d/).size) end - + def test_file_list_is_requirable_separately ruby "-rrake/file_list", "-e 'puts Rake::FileList[\"a\"].size'" assert_equal "1\n", @out assert_equal 0, @status end - + private def assert_not_match(pattern, string, comment="'#{pattern}' was found (incorrectly) in '#{string}.inspect") assert_nil Regexp.new(pattern).match(string), comment end - + def remove_chaining_files %w(play.scpt play.app base).each do |fn| FileUtils.rm_f File.join("test/data/chains", fn) end end - + def remove_namespace_files %w(scopedep.rb).each do |fn| FileUtils.rm_f File.join("test/data/namespace", fn) diff --git a/test/lib/application_test.rb b/test/lib/application_test.rb index 6b95aef29..3aaf511da 100644 --- a/test/lib/application_test.rb +++ b/test/lib/application_test.rb @@ -26,7 +26,7 @@ def setup @app.options.rakelib = [] Rake::TaskManager.record_task_metadata = true end - + def teardown Rake::TaskManager.record_task_metadata = false super @@ -143,7 +143,7 @@ def test_not_finding_rakefile def test_load_rakefile in_environment("PWD" => "test/data/unittest") do - @app.instance_eval do + @app.instance_eval do handle_options options.silent = true load_rakefile @@ -171,8 +171,8 @@ def test_load_rakefile_not_found handle_options options.silent = true end - ex = assert_exception(RuntimeError) do - @app.instance_eval do raw_load_rakefile end + ex = assert_exception(RuntimeError) do + @app.instance_eval do raw_load_rakefile end end assert_match(/no rakefile found/i, ex.message) end @@ -331,7 +331,7 @@ def teardown Rake::FileUtilsExt.verbose_flag = false Rake::FileUtilsExt.nowrite_flag = false end - + def clear_argv while ! ARGV.empty? ARGV.pop @@ -469,7 +469,7 @@ def test_require assert_equal 3, TESTING_REQUIRE.size end end - + def test_missing_require in_environment do ex = assert_exception(LoadError) do @@ -580,7 +580,7 @@ def test_version end end end - + def test_classic_namespace in_environment do flags(['--classic-namespace'], ['-C', '-T', '-P', '-n', '-s', '-t']) do |opts| @@ -598,7 +598,7 @@ def test_bad_option in_environment do error_output = capture_stderr do ex = assert_exception(OptionParser::InvalidOption) do - flags('--bad-option') + flags('--bad-option') end if ex.message =~ /^While/ # Ruby 1.9 error message assert_match(/while parsing/i, ex.message) @@ -615,12 +615,12 @@ def test_task_collection command_line("a", "b") assert_equal ["a", "b"], @tasks.sort end - + def test_default_task_collection command_line() assert_equal ["default"], @tasks end - + def test_environment_definition ENV.delete('TESTKEY') command_line("a", "TESTKEY=12") @@ -628,12 +628,12 @@ def test_environment_definition assert '12', ENV['TESTKEY'] end - private + private def flags(*sets) sets.each do |set| ARGV.clear - @out = capture_stdout { + @out = capture_stdout { @exit = catch(:system_exit) { command_line(*set) } } yield(@app.options) if block_given? @@ -659,31 +659,31 @@ class TestTaskArgumentParsing < Test::Unit::TestCase def setup @app = Rake::Application.new end - + def test_name_only name, args = @app.parse_task_string("name") assert_equal "name", name assert_equal [], args end - + def test_empty_args name, args = @app.parse_task_string("name[]") assert_equal "name", name assert_equal [], args end - + def test_one_argument name, args = @app.parse_task_string("name[one]") assert_equal "name", name assert_equal ["one"], args end - + def test_two_arguments name, args = @app.parse_task_string("name[one,two]") assert_equal "name", name assert_equal ["one", "two"], args end - + def test_can_handle_spaces_between_args name, args = @app.parse_task_string("name[one, two,\tthree , \tfour]") assert_equal "name", name diff --git a/test/lib/definitions_test.rb b/test/lib/definitions_test.rb index 5fba312e6..248879f90 100644 --- a/test/lib/definitions_test.rb +++ b/test/lib/definitions_test.rb @@ -10,7 +10,7 @@ class TestDefinitions < Test::Unit::TestCase include Rake include TestMethods - + EXISTINGFILE = "testdata/existing" def setup @@ -82,4 +82,4 @@ def create_existing_file end end - + diff --git a/test/lib/earlytime_test.rb b/test/lib/earlytime_test.rb index 9c1ebe974..819e25dda 100644 --- a/test/lib/earlytime_test.rb +++ b/test/lib/earlytime_test.rb @@ -25,7 +25,7 @@ def test_original_time_compare_is_not_messed_up assert t1 < t2 assert t2 > t1 assert t1 == t1 - assert t2 == t2 + assert t2 == t2 end def test_to_s diff --git a/test/lib/file_task_test.rb b/test/lib/file_task_test.rb index edac7e7b8..1d7032de4 100644 --- a/test/lib/file_task_test.rb +++ b/test/lib/file_task_test.rb @@ -77,7 +77,7 @@ def test_existing_file_depends_on_non_existing_file # deleting the file target on failure is always the proper thing to # do. I'm willing to hear input on this topic. def ztest_file_deletes_on_failure - task :obj + task :obj file NEWFILE => [:obj] do |t| FileUtils.touch NEWFILE fail "Ooops" diff --git a/test/lib/filelist_test.rb b/test/lib/filelist_test.rb index 4b8e8a63b..a50ee2b85 100644 --- a/test/lib/filelist_test.rb +++ b/test/lib/filelist_test.rb @@ -87,7 +87,7 @@ def test_add_return h = f.include("y") assert_equal f.object_id, h.object_id end - + def test_match fl = FileList.new fl.include('test/lib/*_test.rb') @@ -153,7 +153,7 @@ def test_exclude fl.exclude('testdata/existing') assert_equal [], fl end - + def test_excluding_via_block fl = FileList['testdata/a.c', 'testdata/b.c', 'testdata/xyz.c'] fl.exclude { |fn| fn.pathmap('%n') == 'xyz' } @@ -233,24 +233,24 @@ def test_sub assert_equal ["testdata/abc.o", "testdata/x.o", "testdata/xyz.o"].sort, f3.sort end - + def test_claim_to_be_a_kind_of_array fl = FileList['testdata/*.c'] assert fl.is_a?(Array) assert fl.kind_of?(Array) end - + def test_claim_to_be_a_kind_of_filelist fl = FileList['testdata/*.c'] assert fl.is_a?(FileList) assert fl.kind_of?(FileList) end - + def test_claim_to_be_a_filelist_instance fl = FileList['testdata/*.c'] assert fl.instance_of?(FileList) end - + def test_dont_claim_to_be_an_array_instance fl = FileList['testdata/*.c'] assert ! fl.instance_of?(Array) @@ -592,12 +592,12 @@ def test_other_array_returning_methods assert_equal ['b', 'd'], r assert_equal FileList, r.class end - + def test_file_utils_can_use_filelists cfiles = FileList['testdata/*.c'] - + cp cfiles, @cdir, :verbose => false - + assert File.exist?(File.join(@cdir, 'abc.c')) assert File.exist?(File.join(@cdir, 'xyz.c')) assert File.exist?(File.join(@cdir, 'x.c')) @@ -605,7 +605,7 @@ def test_file_utils_can_use_filelists def create_test_data verbose(false) do - + mkdir "testdata" unless File.exist? "testdata" mkdir "testdata/CVS" rescue nil mkdir "testdata/.svn" rescue nil @@ -623,5 +623,5 @@ def create_test_data touch "testdata/existing" end end - + end diff --git a/test/lib/multitask_test.rb b/test/lib/multitask_test.rb index 04d9ee31e..6527a2764 100644 --- a/test/lib/multitask_test.rb +++ b/test/lib/multitask_test.rb @@ -50,4 +50,4 @@ def test_all_multitasks_wait_on_slow_prerequisites end end - + diff --git a/test/lib/pathmap_test.rb b/test/lib/pathmap_test.rb index 941cf7cec..b572837f5 100644 --- a/test/lib/pathmap_test.rb +++ b/test/lib/pathmap_test.rb @@ -27,7 +27,7 @@ def test_f_returns_basename def test_n_returns_basename_without_extension assert_equal "abc", "abc.rb".pathmap("%n") - assert_equal "abc", "abc".pathmap("%n") + assert_equal "abc", "abc".pathmap("%n") assert_equal "abc", "this/is/a/dir/abc.rb".pathmap("%n") assert_equal "abc", "/this/is/a/dir/abc.rb".pathmap("%n") assert_equal "abc", "/this/is/a/dir/abc".pathmap("%n") diff --git a/test/lib/rake_test.rb b/test/lib/rake_test.rb index c99596572..58e11e222 100644 --- a/test/lib/rake_test.rb +++ b/test/lib/rake_test.rb @@ -37,5 +37,5 @@ def test_can_override_application def test_original_dir_reports_current_dir assert_equal Dir.pwd, Rake.original_dir end - + end diff --git a/test/lib/rdoc_task_test.rb b/test/lib/rdoc_task_test.rb index 2b6519453..4262b793f 100644 --- a/test/lib/rdoc_task_test.rb +++ b/test/lib/rdoc_task_test.rb @@ -7,18 +7,18 @@ class TestRDocTask < Test::Unit::TestCase include Rake include TestMethods - + def setup Task.clear end - + def test_tasks_creation Rake::RDocTask.new assert Task[:rdoc] assert Task[:clobber_rdoc] assert Task[:rerdoc] end - + def test_tasks_creation_with_custom_name_symbol rd = Rake::RDocTask.new(:rdoc_dev) assert Task[:rdoc_dev] @@ -26,7 +26,7 @@ def test_tasks_creation_with_custom_name_symbol assert Task[:rerdoc_dev] assert_equal :rdoc_dev, rd.name end - + def test_tasks_creation_with_custom_name_string rd = Rake::RDocTask.new("rdoc_dev") assert Task[:rdoc_dev] @@ -34,7 +34,7 @@ def test_tasks_creation_with_custom_name_string assert Task[:rerdoc_dev] assert_equal "rdoc_dev", rd.name end - + def test_tasks_creation_with_custom_name_hash options = { :rdoc => "rdoc", :clobber_rdoc => "rdoc:clean", :rerdoc => "rdoc:force" } rd = Rake::RDocTask.new(options) @@ -44,42 +44,42 @@ def test_tasks_creation_with_custom_name_hash assert_raises(RuntimeError) { Task[:clobber_rdoc] } assert_equal options, rd.name end - + def test_tasks_creation_with_custom_name_hash_will_use_default_if_an_option_isnt_given Rake::RDocTask.new(:clobber_rdoc => "rdoc:clean") assert Task[:rdoc] assert Task[:"rdoc:clean"] assert Task[:rerdoc] end - + def test_tasks_creation_with_custom_name_hash_raises_exception_if_invalid_option_given assert_raises(ArgumentError) do Rake::RDocTask.new(:foo => "bar") end - + begin Rake::RDocTask.new(:foo => "bar") rescue ArgumentError => e assert_match(/foo/, e.message) end end - + def test_inline_source_is_enabled_by_default rd = Rake::RDocTask.new assert rd.option_list.include?('--inline-source') end - + def test_inline_source_option_is_only_appended_if_option_not_already_given rd = Rake::RDocTask.new rd.options << '--inline-source' assert_equal 1, rd.option_list.grep('--inline-source').size - + rd = Rake::RDocTask.new rd.options << '-S' assert_equal 1, rd.option_list.grep('-S').size assert_equal 0, rd.option_list.grep('--inline-source').size end - + def test_inline_source_option_can_be_disabled rd = Rake::RDocTask.new rd.inline_source = false diff --git a/test/lib/task_arguments_test.rb b/test/lib/task_arguments_test.rb index b2a1212eb..48d4f1747 100644 --- a/test/lib/task_arguments_test.rb +++ b/test/lib/task_arguments_test.rb @@ -73,7 +73,7 @@ def test_child_hides_parent_arg_names child = Rake::TaskArguments.new(['aa'], [2], parent) assert_equal 2, child.aa end - + def test_default_arguments_values_can_be_merged ta = Rake::TaskArguments.new(["aa", "bb"], [nil, "original_val"]) ta.with_defaults({ :aa => 'default_val' }) diff --git a/test/lib/task_manager_test.rb b/test/lib/task_manager_test.rb index c60fb53bd..8d4c78923 100644 --- a/test/lib/task_manager_test.rb +++ b/test/lib/task_manager_test.rb @@ -129,7 +129,7 @@ def test_lookup_with_explicit_scopes end end assert_equal t1, @tm[:t, []] - assert_equal t2, @tm[:t, ["a"]] + assert_equal t2, @tm[:t, ["a"]] assert_equal t3, @tm[:t, ["a", "b"]] assert_equal s, @tm[:s, ["a", "b"]] assert_equal s, @tm[:s, ["a"]] @@ -147,7 +147,7 @@ def test_correctly_scoped_prerequisites_are_invoked @tm["a:x"].invoke assert_equal ["next z"], values end - + end class TestTaskManagerArgumentResolution < Test::Unit::TestCase diff --git a/test/lib/test_task_test.rb b/test/lib/test_task_test.rb index 8a18ec046..90b1bdfe5 100644 --- a/test/lib/test_task_test.rb +++ b/test/lib/test_task_test.rb @@ -6,7 +6,7 @@ class TestTestTask < Test::Unit::TestCase include Rake include TestMethods - + def setup Task.clear ENV.delete('TEST')