1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* test/rubygems/simple_gem.rb: updated for 1.9.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-03-07 10:36:27 +00:00
parent 31c2bfe881
commit 753f4824e3

View file

@ -5,28 +5,32 @@
#++
SIMPLE_GEM = <<-GEMDATA
MD5SUM = "e3701f9db765a2358aef94c40ded71c8"
MD5SUM = "954df67d9475aa2f4fbba20aa33649c8"
if $0 == __FILE__
require 'optparse'
options = {}
ARGV.options do |opts|
opts.on_tail("--help", "show this message") {puts opts; exit}
opts.on('--dir=DIRNAME', "Installation directory for the Gem") {|options[:directory]|}
opts.on('--force', "Force Gem to intall, bypassing dependency checks") {|options[:force]|}
opts.on('--gen-rdoc', "Generate RDoc documentation for the Gem") {|options[:gen_rdoc]|}
opts.on('--dir=DIRNAME', "Installation directory for the Gem") {|x|
options[:directory] = x
}
opts.on('--force', "Force Gem to intall, bypassing dependency checks") {|x|
options[:force] = x
}
opts.on('--gen-rdoc', "Generate RDoc documentation for the Gem") {|x|
options[:gen_rdoc] = x
}
opts.parse!
end
require 'rubygems'
@directory = options[:directory] || Gem.dir
@force = options[:force]
require 'rubygems/installer'
gem = Gem::Installer.new(__FILE__).install(@force, @directory)
gem = Gem::Installer.new(__FILE__, options).install
if options[:gen_rdoc]
Gem::DocManager.new(gem).generate_rdoc
end
end
end
__END__
--- !ruby/object:Gem::Specification