class Bundler::UI::Shell
def word_wrap(text, line_width = @shell.terminal_width)
def word_wrap(text, line_width = @shell.terminal_width) strip_leading_spaces(text).split("\n").collect do |line| line.length > line_width ? line.gsub(/(.{1,#{line_width}})(\s+|$)/, "\\1\n").strip : line end * "\n" end