Create a new NotWellFormedError
for an error at line
in element
. If a block is given the return value of the block ends up in the error message.
Initializes a generic gem command named command
. summary
is a short description displayed in ‘gem help commands`. defaults
are the default options. Defaults should be mirrored in defaults_str
, unless there are none.
When defining a new command subclass, use add_option
to add command-line switches.
Unhandled arguments (gem names, files, etc.) are left in options[:args]
.
Register all the subcommands supported by the gem command.
Create the config file object. args
is the list of arguments from the command line.
The following command line options are handled early here rather than later at the time most command options are processed.
--config-file
, --config-file==NAME
Obviously these need to be handled by the ConfigFile
object to ensure we get the right config file.
--backtrace
Backtrace needs to be turned on early so that errors before normal option parsing can be properly handled.
--debug
Enable Ruby level debug messages. Handled early for the same reason as –backtrace.
Creates a new installer instance.
Options are:
Alternate repository path to store .gem files in.
:local, :remote, or :both. :local only searches gems in the current directory. :remote searches only gems in Gem::sources
. :both searches both.
See Gem::Installer::new
.
See Gem::Installer#initialize.
Don’t install any dependencies.
Allow prerelease versions. See install
.
See Gem::Installer::new
and Gem::Security
.