2016-02-01 07:43:26 -05:00
|
|
|
# frozen_string_literal: true
|
2010-02-21 21:52:35 -05:00
|
|
|
SIMPLE_GEM = <<-GEMDATA
|
2011-01-28 18:46:47 -05:00
|
|
|
MD5SUM = "989bf34a1cbecd52e0ea66b662b3a405"
|
2007-11-10 02:48:56 -05:00
|
|
|
if $0 == __FILE__
|
|
|
|
require 'optparse'
|
2009-12-08 02:19:09 -05:00
|
|
|
|
2007-11-10 02:48:56 -05:00
|
|
|
options = {}
|
|
|
|
ARGV.options do |opts|
|
|
|
|
opts.on_tail("--help", "show this message") {puts opts; exit}
|
2009-06-09 17:38:59 -04:00
|
|
|
opts.on('--dir=DIRNAME', "Installation directory for the Gem") {|options[:directory]|}
|
2011-01-28 18:46:47 -05:00
|
|
|
opts.on('--force', "Force Gem to install, bypassing dependency checks") {|options[:force]|}
|
2009-06-09 17:38:59 -04:00
|
|
|
opts.on('--gen-rdoc', "Generate RDoc documentation for the Gem") {|options[:gen_rdoc]|}
|
2007-11-10 02:48:56 -05:00
|
|
|
opts.parse!
|
|
|
|
end
|
|
|
|
|
2009-06-09 17:38:59 -04:00
|
|
|
require 'rubygems'
|
2009-12-08 02:19:09 -05:00
|
|
|
@directory = options[:directory] || Gem.dir
|
2009-06-09 17:38:59 -04:00
|
|
|
@force = options[:force]
|
2009-12-08 02:19:09 -05:00
|
|
|
|
2015-07-01 17:50:14 -04:00
|
|
|
gem = Gem::Installer.at(__FILE__).install(@force, @directory)
|
2007-11-10 02:48:56 -05:00
|
|
|
if options[:gen_rdoc]
|
|
|
|
Gem::DocManager.new(gem).generate_rdoc
|
|
|
|
end
|
2009-06-09 17:38:59 -04:00
|
|
|
end
|
2007-11-10 02:48:56 -05:00
|
|
|
|
|
|
|
__END__
|
2009-12-08 02:19:09 -05:00
|
|
|
--- !ruby/object:Gem::Specification
|
2007-11-10 02:48:56 -05:00
|
|
|
rubygems_version: "1.0"
|
|
|
|
name: testing
|
2009-12-08 02:19:09 -05:00
|
|
|
version: !ruby/object:Gem::Version
|
2007-11-10 02:48:56 -05:00
|
|
|
version: 1.2.3
|
|
|
|
date: 2004-03-18 22:01:52.859121 -05:00
|
2009-12-08 02:19:09 -05:00
|
|
|
platform:
|
2007-11-10 02:48:56 -05:00
|
|
|
summary: This exercise the gem testing stuff.
|
2009-12-08 02:19:09 -05:00
|
|
|
require_paths:
|
2007-11-10 02:48:56 -05:00
|
|
|
- lib
|
2009-12-08 02:19:09 -05:00
|
|
|
files:
|
2007-11-10 02:48:56 -05:00
|
|
|
- lib/foo.rb
|
|
|
|
- lib/test
|
|
|
|
- lib/test.rb
|
|
|
|
- lib/test/wow.rb
|
|
|
|
autorequire: test
|
|
|
|
test_suite_file: foo
|
2009-12-08 02:19:09 -05:00
|
|
|
requirements:
|
2007-11-10 02:48:56 -05:00
|
|
|
- a computer processor
|
2009-12-08 02:19:09 -05:00
|
|
|
---
|
|
|
|
-
|
2007-11-10 02:48:56 -05:00
|
|
|
size: 109
|
|
|
|
mode: 420
|
|
|
|
path: lib/foo.rb
|
2009-12-08 02:19:09 -05:00
|
|
|
-
|
2007-11-10 02:48:56 -05:00
|
|
|
size: 0
|
|
|
|
mode: 420
|
|
|
|
path: lib/test.rb
|
2009-12-08 02:19:09 -05:00
|
|
|
-
|
2007-11-10 02:48:56 -05:00
|
|
|
size: 15
|
|
|
|
mode: 420
|
|
|
|
path: lib/test/wow.rb
|
|
|
|
---
|
|
|
|
eJwVjDEKgDAUQ/eeIpsKguhY3ARPoHMp9quF0mL7e39/h5DwQpLpqz4TOqbC
|
|
|
|
U42eO6WuYEvBntIhECuaaX1KqXXLmy2kAEc32szExK+PjyBAlpTZyK0N/Twu
|
|
|
|
g1CKTjX9BGAj1w==
|
|
|
|
---
|
|
|
|
eJwDAAAAAAE=
|
|
|
|
---
|
|
|
|
eJwrKC0pVlAvzy9XyE3MU+cCACwiBP4=
|
2010-02-21 21:52:35 -05:00
|
|
|
GEMDATA
|