Rails 2.1
Update to Rails 2.1 final.
This commit is contained in:
parent
fd554cce90
commit
516d6dfac0
257 changed files with 4058 additions and 1933 deletions
|
@ -31,12 +31,13 @@ module Rails
|
|||
args << @requirement.to_s if @requirement
|
||||
gem *args
|
||||
else
|
||||
$LOAD_PATH << File.join(unpacked_paths.first, 'lib')
|
||||
$LOAD_PATH.unshift File.join(unpacked_paths.first, 'lib')
|
||||
ext = File.join(unpacked_paths.first, 'ext')
|
||||
$LOAD_PATH.unshift(ext) if File.exist?(ext)
|
||||
@frozen = true
|
||||
end
|
||||
@load_paths_added = true
|
||||
rescue Gem::LoadError
|
||||
puts $!.to_s
|
||||
end
|
||||
|
||||
def dependencies
|
||||
|
@ -73,7 +74,9 @@ module Rails
|
|||
end
|
||||
|
||||
def install
|
||||
Gem::GemRunner.new.run(install_command)
|
||||
cmd = "#{gem_command} #{install_command.join(' ')}"
|
||||
puts cmd
|
||||
puts %x(#{cmd})
|
||||
end
|
||||
|
||||
def unpack_to(directory)
|
||||
|
@ -100,10 +103,14 @@ private ###################################################################
|
|||
def specification
|
||||
@spec ||= Gem.source_index.search(Gem::Dependency.new(@name, @requirement)).sort_by { |s| s.version }.last
|
||||
end
|
||||
|
||||
def gem_command
|
||||
RUBY_PLATFORM =~ /win32/ ? 'gem.bat' : 'gem'
|
||||
end
|
||||
|
||||
def install_command
|
||||
cmd = %w(install) << @name
|
||||
cmd << "--version" << "#{@requirement.to_s}" if @requirement
|
||||
cmd << "--version" << %("#{@requirement.to_s}") if @requirement
|
||||
cmd << "--source" << @source if @source
|
||||
cmd
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue