[Rubygems-developers] Abstracted user interaction now complete...
rich at infoether.com
Fri Jun 11 12:00:07 EDT 2004
I abstracted the user interaction in RubyGems. I replaced the
puts/print/gets/STDERR.puts/exit/exit! with a set of mixin module methods in
All classes that called any of those prior functions now include
UserInteraction. UserInteraction define the following methods:
=> present question and array of strings (list) and return string, num
=> ask a question, return the response (string)
=> output statement
=> output INFO message and 'ask' optional question
=> output WARNING message and 'ask' optional question
=> output ERROR message and 'ask' optional question
=> this should close the gems session immediately (exit!)
=> this should close the gems session (exit)
The goal is to create a helper class which will make replacing these module
methods on the fly with methods that 'hook' them and replace the default
(STDOUT/STDERR/STDIN) IO with an alternative (such as a graphical
Now onto building the gem <command> functions!
All functional tests continue (after a bit 'o work) to pass!
More information about the Rubygems-developers