aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authordrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-10 20:44:57 +0000
committerdrbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-11-10 20:44:57 +0000
commitfc69e47713f248ca3c7429e532957032b4e09bf4 (patch)
tree4260cc941c3f4fa88e7817e3b1bd53af1c4ada92 /bin
parent53d2cd2435f8caaa1a3dc762e3e089c302b60a44 (diff)
downloadruby-fc69e47713f248ca3c7429e532957032b4e09bf4.tar.gz
Add forgotten bin/gem for RubyGems.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gem23
1 files changed, 23 insertions, 0 deletions
diff --git a/bin/gem b/bin/gem
new file mode 100755
index 0000000000..5478606c52
--- /dev/null
+++ b/bin/gem
@@ -0,0 +1,23 @@
+#!/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'
+
+required_version = Gem::Requirement.new ">= 1.8.2"
+
+unless required_version.satisfied_by? Gem::Version.new(RUBY_VERSION) then
+ abort "Expected Ruby Version #{required_version}, was #{RUBY_VERSION}"
+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("--")]
+
+Gem::GemRunner.new.run args
+