Add some more control over Console output, and improve default behavior.
Review Request #11418 — Created Jan. 28, 2021 and submitted
This introduces some new changes that ease working with
Console
and
getting the behavior that the caller wants.
-
Newlines around some text blocks can now be turned off
(console.note()
,console.warning()
,console.error()
). -
Results from
prompt_input()
are now stripped by default. This can be
controlled by passingstrip=False
. -
console.print()
now processes text as paragraphs by default when
wrapping, and adds leading indentation to each line when not. This
also removesas_paragraphs=
. -
console.progress_step()
now shows anERROR: <message>
if an
exception is raised. -
Wrap widths for the terminal no longer add padding to the right.
-
uninit_console()
was added, which will unset theConsole
instance.
This somewhat breaks presentation with ConsoleUI
, but that class will
soon be removed.
Ran through
rb-site install --advanced
andrb-site upgrade
.Tested with some upcoming changes that better utilized the features,
making sure that the presentation matched expectations.
Summary | ID |
---|---|
bff8345cfc075248c34d84df46df77abcdeaf43e |