2007-11-10 15:44:57 -05:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
#--
|
|
|
|
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
|
|
|
|
# All rights reserved.
|
|
|
|
# See LICENSE.txt for permissions.
|
|
|
|
#++
|
|
|
|
|
|
|
|
require 'rubygems'
|
|
|
|
require 'rubygems/gem_runner'
|
2008-03-31 18:40:06 -04:00
|
|
|
require 'rubygems/exceptions'
|
2007-11-10 15:44:57 -05:00
|
|
|
|
2008-03-31 18:40:06 -04:00
|
|
|
required_version = Gem::Requirement.new "> 1.8.3"
|
2007-11-10 15:44:57 -05:00
|
|
|
|
2008-03-31 18:40:06 -04:00
|
|
|
unless required_version.satisfied_by? Gem.ruby_version then
|
|
|
|
abort "Expected Ruby Version #{required_version}, was #{Gem.ruby_version}"
|
2007-11-10 15:44:57 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
# We need to preserve the original ARGV to use for passing gem options
|
|
|
|
# to source gems. If there is a -- in the line, strip all options after
|
|
|
|
# it...its for the source building process.
|
|
|
|
args = !ARGV.include?("--") ? ARGV.clone : ARGV[0...ARGV.index("--")]
|
|
|
|
|
2008-03-31 18:40:06 -04:00
|
|
|
begin
|
|
|
|
Gem::GemRunner.new.run args
|
|
|
|
rescue Gem::SystemExitException => e
|
|
|
|
exit e.exit_code
|
|
|
|
end
|
2007-11-10 15:44:57 -05:00
|
|
|
|