summaryrefslogtreecommitdiff
path: root/lib/rake
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-02 19:07:55 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-10-02 19:07:55 +0000
commit719b0f8e3037e1033726b6487d7b0d9fc1412e7d (patch)
treec5a08c8c9abae9b7f0514f680f56553a7a03656a /lib/rake
parenta0f667c33e24928374d494c9c33d0082355785e1 (diff)
* lib/rake: updated to rake code to rake-0.8.7 source code base.
* lib/rake/loaders/makefile.rb (Rake::MakefileLoader#process_line): respace dependencies too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@25199 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rake')
-rw-r--r--lib/rake/loaders/makefile.rb2
-rw-r--r--lib/rake/rdoctask.rb4
-rw-r--r--lib/rake/testtask.rb15
-rw-r--r--lib/rake/win32.rb18
4 files changed, 21 insertions, 18 deletions
diff --git a/lib/rake/loaders/makefile.rb b/lib/rake/loaders/makefile.rb
index c77d428596..9a2ac8090e 100644
--- a/lib/rake/loaders/makefile.rb
+++ b/lib/rake/loaders/makefile.rb
@@ -21,7 +21,7 @@ module Rake
def process_line(line)
file_tasks, args = line.split(':', 2)
return if args.nil?
- dependents = args.split
+ dependents = args.split.map {|arg| respace(arg)}
file_tasks.scan(/\S+/) do |file_task|
file_task = respace(file_task)
file file_task => dependents
diff --git a/lib/rake/rdoctask.rb b/lib/rake/rdoctask.rb
index de020f4d87..9198806026 100644
--- a/lib/rake/rdoctask.rb
+++ b/lib/rake/rdoctask.rb
@@ -19,7 +19,7 @@ module Rake
# Rebuild the rdoc files from scratch, even if they are not out
# of date.
#
- # Simple example:
+ # Simple Example:
#
# Rake::RDocTask.new do |rd|
# rd.main = "README.rdoc"
@@ -132,7 +132,7 @@ module Rake
args = option_list + @rdoc_files
if @external
argstring = args.join(' ')
- sh %{ruby -Ivendor vender/rd #{argstring}}
+ sh %{ruby -Ivendor vendor/rd #{argstring}}
else
require 'rdoc/rdoc'
RDoc::RDoc.new.document(args)
diff --git a/lib/rake/testtask.rb b/lib/rake/testtask.rb
index 3444012500..c400205ff3 100644
--- a/lib/rake/testtask.rb
+++ b/lib/rake/testtask.rb
@@ -93,7 +93,7 @@ module Rake
# Create the tasks defined by this task lib.
def define
- lib_path = @libs.collect {|path| "-I#{File.expand_path(path)}"}
+ lib_path = @libs.join(File::PATH_SEPARATOR)
desc "Run tests" + (@name==:test ? "" : " for #{@name}")
task @name do
run_code = ''
@@ -103,11 +103,11 @@ module Rake
when :direct
"-e 'ARGV.each{|f| load f}'"
when :testrb
- "-S testrb #{fix}"
+ "-S testrb"
when :rake
rake_loader
end
- @ruby_opts.unshift( *lib_path )
+ @ruby_opts.unshift( "-I\"#{lib_path}\"" )
@ruby_opts.unshift( "-w" ) if @warning
ruby @ruby_opts.join(" ") +
" \"#{run_code}\" " +
@@ -133,15 +133,6 @@ module Rake
end
end
- def fix # :nodoc:
- case RUBY_VERSION
- when '1.8.2'
- find_file 'rake/ruby182_test_unit_fix'
- else
- nil
- end || ''
- end
-
def rake_loader # :nodoc:
find_file('rake/rake_test_loader') or
fail "unable to find rake test loader"
diff --git a/lib/rake/win32.rb b/lib/rake/win32.rb
index 96f66d6957..0ab31c2822 100644
--- a/lib/rake/win32.rb
+++ b/lib/rake/win32.rb
@@ -5,9 +5,10 @@ module Rake
module Win32
class << self
# True if running on a windows system.
- def windows?
- # assume other DOSish systems are extinct.
- File::ALT_SEPARATOR == '\\'
+ if File::ALT_SEPARATOR == '\\' # assume other DOSish systems are extinct.
+ def windows?; true end
+ else
+ def windows?; false end
end
end
@@ -29,6 +30,17 @@ module Rake
end
File.expand_path('Rake', win32_shared_path)
end
+
+ # Normalize a win32 path so that the slashes are all forward slashes.
+ def normalize(path)
+ path.tr('\\', '/')
+ end
end if windows?
end
+
+ if Win32.windows?
+ def standard_system_dir
+ Win32.win32_system_dir
+ end
+ end
end