[Rubygems-developers] Weekend Summary
Jim Weirich
jim at weirichhouse.org
Sat Jul 3 15:58:34 EDT 2004
I've reached a stopping point and I want to give everyone a heads up on
what has been done.
The .gemrc file is now working with the gem command as documented on the
wiki site. This one was a headache to implement because it touched so
many different areas. It also had startup issues because the config
file had to be read before the commands were created (the commands
depend upon some state possibly affected by the config file). But the
command line is processed by a command after it is created. But the
config file is specified on the command line.
I ended up handling the --config-file and --backtrace options separately
from all the other options. They are handled before the command manager
is created. Oh yeah, the command handler is now created by the
GemRunner (which also handles the early command line parameter options).
Also, commands are now able to report on whether or not they support a
given option. Ask a command: cmd.handles?(["--local"]) and it will
report true or false. I needed this to be able to dump the .gemrc
options that weren't appropriate for a given command. (Did I mention the
.gemrc stuff was a headache).
A word about the the --backtrace option. Normally, the gem command will
print out an error message and stop when an exception percolates all the
way up to the top of the program. This is fine for normal use, but we
need to see a backtrace when debugging. The backtrace option enables
that backtrace for us. So, if a command fails, just run it again with
--backtrace.
Documentation has been extensively updated to the new command format.
With the exception of the details on the Gem specification, it should be
ready. I took a bold step and wrote up a versioning policy. Review
that and the other new pages and provide some feedback. Thanks.
Outstanding Issues:
* Does require_gem honor the .gemrc file settings? I bet it doesn't.
(See! It is a headache).
* The GemSpecInDetail page is the only big piece of documentation still
missing (yes, I know I haven't documented --backtrace yet).
If we double check the require_gem/.gemrc issue, I see no barriers to a
new release.
--
-- Jim Weirich jim at weirichhouse.org http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
More information about the Rubygems-developers
mailing list