Watson1978
2/9/2012 - 1:46 PM

diff rake v0.8.7 vs MacRuby's

diff rake v0.8.7 vs MacRuby's

Binary files rake-v0.8.7/lib/.DS_Store and macruby/lib/.DS_Store differ
Only in rake-v0.8.7/lib/rake: .DS_Store
Only in rake-v0.8.7/lib/rake: alt_system.rb
diff -r rake-v0.8.7/lib/rake/clean.rb macruby/lib/rake/clean.rb
1,2d0
< #!/usr/bin/env ruby
< 
19,20c17,18
< CLEAN.clear_exclude.exclude { |fn| 
<   fn.pathmap("%f") == 'core' && File.directory?(fn) 
---
> CLEAN.clear_exclude.exclude { |fn|
>   fn.pathmap("%f") == 'core' && File.directory?(fn)
Only in macruby/lib/rake: compiletask.rb
diff -r rake-v0.8.7/lib/rake/contrib/compositepublisher.rb macruby/lib/rake/contrib/compositepublisher.rb
1,2d0
< #!/usr/bin/env ruby
< 
10c8
<     
---
> 
15c13
<     
---
> 
23,24d20
< 
< 
diff -r rake-v0.8.7/lib/rake/contrib/ftptools.rb macruby/lib/rake/contrib/ftptools.rb
1,2d0
< #!/usr/bin/env ruby
< 
137c135
<     
---
> 
diff -r rake-v0.8.7/lib/rake/contrib/publisher.rb macruby/lib/rake/contrib/publisher.rb
1,2d0
< #!/usr/bin/env ruby
< 
16c14
< #             placed. 
---
> #             placed.
diff -r rake-v0.8.7/lib/rake/contrib/rubyforgepublisher.rb macruby/lib/rake/contrib/rubyforgepublisher.rb
1,2d0
< #!/usr/bin/env ruby
< 
9c7
<     
---
> 
17c15
<   
---
> 
diff -r rake-v0.8.7/lib/rake/contrib/sshpublisher.rb macruby/lib/rake/contrib/sshpublisher.rb
1,2d0
< #!/usr/bin/env ruby
< 
15c13
<     
---
> 
20c18
<   
---
> 
29c27
<   
---
> 
39c37
<     
---
> 
Only in rake-v0.8.7/lib/rake/contrib: sys.rb
diff -r rake-v0.8.7/lib/rake/gempackagetask.rb macruby/lib/rake/gempackagetask.rb
1,2d0
< #!/usr/bin/env ruby
< 
38c36
<   #   and dependencies are specified in standard Ruby syntax. 
---
>   #   and dependencies are specified in standard Ruby syntax.
41c39
<   #   
---
>   #
87c85
<     
---
> 
95c93
<     
---
> 
Only in rake-v0.8.7/lib/rake: lib
diff -r rake-v0.8.7/lib/rake/loaders/makefile.rb macruby/lib/rake/loaders/makefile.rb
1,2d0
< #!/usr/bin/env ruby
< 
7c5
<     SPACE_MARK = "__&NBSP;__"
---
>     SPACE_MARK = "\0"
11,18c9,14
<       open(fn) do |mf|
<         lines = mf.read
<         lines.gsub!(/\\ /, SPACE_MARK)
<         lines.gsub!(/#[^\n]*\n/m, "")
<         lines.gsub!(/\\\n/, ' ')
<         lines.split("\n").each do |line|
<           process_line(line)
<         end
---
>       lines = open(fn) {|mf| mf.read}
>       lines.gsub!(/\\ /, SPACE_MARK)
>       lines.gsub!(/#[^\n]*\n/m, "")
>       lines.gsub!(/\\\n/, ' ')
>       lines.each_line do |line|
>         process_line(line)
26c22
<       file_tasks, args = line.split(':')
---
>       file_tasks, args = line.split(':', 2)
28,29c24,25
<       dependents = args.split.map { |d| respace(d) }
<       file_tasks.strip.split.each do |file_task|
---
>       dependents = args.split.map {|arg| respace(arg)}
>       file_tasks.scan(/\S+/) do |file_task|
34c30
<     
---
> 
36c32
<       str.gsub(/#{SPACE_MARK}/, ' ')
---
>       str.tr(SPACE_MARK, ' ')
diff -r rake-v0.8.7/lib/rake/packagetask.rb macruby/lib/rake/packagetask.rb
1,3c1
< #!/usr/bin/env ruby
< 
< # Define a package task libarary to aid in the definition of
---
> # Define a package task library to aid in the definition of
28c26
<   #   Create a gzipped tar package (if <em>need_tar</em> is true).  
---
>   #   Create a gzipped tar package (if <em>need_tar</em> is true).
31c29
<   #   Create a gzipped tar package (if <em>need_tar_gz</em> is true).  
---
>   #   Create a gzipped tar package (if <em>need_tar_gz</em> is true).
34c32
<   #   Create a bzip2'd tar package (if <em>need_tar_bz2</em> is true).  
---
>   #   Create a bzip2'd tar package (if <em>need_tar_bz2</em> is true).
77c75
<     # Create a Package Task with the given name and version. 
---
>     # Create a Package Task with the given name and version.
105c103
<       
---
> 
108,109c106,107
<       
<       desc "Remove package products" 
---
> 
>       desc "Remove package products"
130c128
<       
---
> 
162c160
<       
---
> 
diff -r rake-v0.8.7/lib/rake/rdoctask.rb macruby/lib/rake/rdoctask.rb
1,2d0
< #!/usr/bin/env ruby
< 
13,14c11,12
<   # [<b><em>rdoc</em></b>]
<   #   Main task for this RDOC task.  
---
>   # [<b>:<em>rdoc</em></b>]
>   #   Main task for this RDOC task.
47c45
<   # :re<em>rdoc_dev</em>. 
---
>   # :re<em>rdoc_dev</em>.
84c82
<     
---
> 
96c94
<       
---
> 
109c107
<     
---
> 
118c116
<       
---
> 
121,122c119,120
<       
<       desc "Remove rdoc products" 
---
> 
>       desc "Remove rdoc products"
126c124
<       
---
> 
128c126
<       
---
> 
145a144
>     # List of options that will be supplied to RDoc
167c166
<     
---
> 
176c175
<     
---
> 
180c179
<     
---
> 
189c188
<     
---
> 
198c197
<     
---
> 
Only in rake-v0.8.7/lib/rake: ruby182_test_unit_fix.rb
diff -r rake-v0.8.7/lib/rake/runtest.rb macruby/lib/rake/runtest.rb
1,2d0
< #!/usr/bin/env ruby
< 
diff -r rake-v0.8.7/lib/rake/tasklib.rb macruby/lib/rake/tasklib.rb
1,2d0
< #!/usr/bin/env ruby
< 
diff -r rake-v0.8.7/lib/rake/testtask.rb macruby/lib/rake/testtask.rb
1,2d0
< #!/usr/bin/env ruby
< 
13c11
<   #  
---
>   #
66c64
<     # 
---
>     #
108c106
<               "-S testrb #{fix}"
---
>               "-S testrb"
138,146d135
<     def fix # :nodoc:
<       case RUBY_VERSION
<       when '1.8.2'
<         find_file 'rake/ruby182_test_unit_fix'
<       else
<         nil
<       end || ''
<     end
< 
diff -r rake-v0.8.7/lib/rake/win32.rb macruby/lib/rake/win32.rb
1d0
< 
3d1
<   require 'rake/alt_system'
8,13d5
<     
<     # Error indicating a problem in locating the home directory on a
<     # Win32 system.
<     class Win32HomeError < RuntimeError
<     end
<     
16,17c8,11
<       def windows?
<         AltSystem::WINDOWS
---
>       if File::ALT_SEPARATOR == '\\' # assume other DOSish systems are extinct.
>         def windows?; true end
>       else
>         def windows?; false end
18a13
>     end
20,24c15
<       # Run a command line on windows.
<       def rake_system(*cmd)
<         AltSystem.system(*cmd)
<       end
<       
---
>     class << self
28a20
>       # * APPDATA
31d22
<       # * APPDATA
34c25
<       # If the above are not defined, the return nil.
---
>       # If the above are not defined, retruns the personal folder.
36,38c27,29
<         win32_shared_path = ENV['HOME']
<         if win32_shared_path.nil? && ENV['HOMEDRIVE'] && ENV['HOMEPATH']
<           win32_shared_path = ENV['HOMEDRIVE'] + ENV['HOMEPATH']
---
>         win32_shared_path = ENV['APPDATA']
>         if !win32_shared_path or win32_shared_path.empty?
>           win32_shared_path = '~'
40,45c31
< 
<         win32_shared_path ||= ENV['APPDATA']
<         win32_shared_path ||= ENV['USERPROFILE']
<         raise Win32HomeError, "Unable to determine home path environment variable." if
<           win32_shared_path.nil? or win32_shared_path.empty?
<         normalize(File.join(win32_shared_path, 'Rake'))
---
>         File.expand_path('Rake', win32_shared_path)
50c36
<         path.gsub(/\\/, '/')
---
>         path.tr('\\', '/')
52c38,43
<       
---
>     end if windows?
>   end
> 
>   if Win32.windows?
>     def standard_system_dir
>       Win32.win32_system_dir
diff -r rake-v0.8.7/lib/rake.rb macruby/lib/rake.rb
1,2d0
< #!/usr/bin/env ruby
< 
120c118
<       
---
> 
388c386
<     
---
> 
390c388
<     
---
> 
960c958
<   RUBY_EXT = ((Config::CONFIG['ruby_install_name'] =~ /\.(com|cmd|exe|bat|rb|sh)$/) ?
---
>   RUBY_EXT = ((RbConfig::CONFIG['ruby_install_name'] =~ /\.(com|cmd|exe|bat|rb|sh)$/) ?
962,963c960,961
<     Config::CONFIG['EXEEXT'])
<   
---
>     RbConfig::CONFIG['EXEEXT'])
> 
965,966c963,964
<     Config::CONFIG['bindir'],
<     Config::CONFIG['ruby_install_name'] + RUBY_EXT).
---
>     RbConfig::CONFIG['bindir'],
>     RbConfig::CONFIG['ruby_install_name'] + RUBY_EXT).
1015c1013
<     Rake::AltSystem.system(*cmd)
---
>     system(*cmd)
1200,1201c1198,1200
< private(*FileUtils.instance_methods(false))
< private(*RakeFileUtils.instance_methods(false))
---
> #FIXME: cannot use this in MacRuby yet
> #private(*FileUtils.instance_methods(false))
> #private(*RakeFileUtils.instance_methods(false))
1242c1241
<     ARRAY_METHODS = (Array.instance_methods - Object.instance_methods).map { |n| n.to_s }
---
>     ARRAY_METHODS = (Array.instance_methods - (Object.instance_methods - [:<=>])).map { |n| n.to_s }
1264,1271c1263,1267
<         ln = __LINE__+1
<         class_eval %{
<           def #{sym}(*args, &block)
<             resolve
<             result = @items.send(:#{sym}, *args, &block)
<             FileList.new.import(result)
<           end
<         }, __FILE__, ln
---
>         define_method(sym) do |*args, &block|
>           resolve
>           result = @items.send(sym, *args, &block)
>           FileList.new.import(result)
>         end
1273,1280c1269,1273
<         ln = __LINE__+1
<         class_eval %{
<           def #{sym}(*args, &block)
<             resolve
<             result = @items.send(:#{sym}, *args, &block)
<             result.object_id == @items.object_id ? self : result
<           end
<         }, __FILE__, ln
---
>         define_method(sym) do |*args, &block|
>           resolve
>           result = @items.send(sym, *args, &block)
>           result.object_id == @items.object_id ? self : result
>         end
1766c1759
<     
---
> 
1797c1790
<     
---
> 
1998,2002c1991,1993
<       standard_exception_handling do
<         init
<         load_rakefile
<         top_level
<       end
---
>       init
>       load_rakefile
>       top_level
2153c2144
<     # Calculate the dynamic width of the 
---
>     # Calculate the dynamic width of the
2169c2160
<     
---
> 
2229c2220
<           lambda { |value| eval(value) }            
---
>           lambda { |value| eval(value) }
2241c2232
<           lambda { |value| 
---
>           lambda { |value|
2243c2234
<             @rakefiles.clear 
---
>             @rakefiles.clear
2400,2407c2391
<       @system_dir ||=
<         begin
<           if ENV['RAKE_SYSTEM']
<             ENV['RAKE_SYSTEM']
<           else
<             standard_system_dir
<           end
<         end
---
>       @system_dir ||= ENV['RAKE_SYSTEM'] || standard_system_dir
2409c2393
<     
---
> 
2411,2415c2395
<     if Win32.windows?
<       def standard_system_dir #:nodoc:
<         Win32.win32_system_dir
<       end
<     else
---
>     unless method_defined?(:standard_system_dir)
2417c2397
<         File.join(File.expand_path('~'), '.rake')
---
>         File.expand_path('~/.rake')