Vendoring Rails 2.3.5

This commit is contained in:
Eric Allen 2009-12-07 12:42:42 -05:00
parent 3e83d19299
commit f8779795ce
943 changed files with 56503 additions and 61351 deletions

View file

@ -134,7 +134,8 @@ class RailsEnvironment
def externals
return [] unless use_externals?
ext = `svn propget svn:externals "#{root}/vendor/plugins"`
ext.reject{ |line| line.strip == '' }.map do |line|
lines = ext.respond_to?(:lines) ? ext.lines : ext
lines.reject{ |line| line.strip == '' }.map do |line|
line.strip.split(/\s+/, 2)
end
end
@ -267,7 +268,7 @@ class Plugin
def install_using_git(options = {})
root = rails_env.root
install_path = mkdir_p "#{root}/vendor/plugins/#{name}"
mkdir_p(install_path = "#{root}/vendor/plugins/#{name}")
Dir.chdir install_path do
init_cmd = "git init"
init_cmd += " -q" if options[:quiet] and not $verbose
@ -278,8 +279,8 @@ class Plugin
base_cmd += " #{options[:revision]}" if options[:revision]
puts base_cmd if $verbose
if system(base_cmd)
puts "removing: .git" if $verbose
rm_rf ".git"
puts "removing: .git .gitignore" if $verbose
rm_rf %w(.git .gitignore)
else
rm_rf install_path
end