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