lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb in bundler-1.15.4 vs lib/bundler/vendor/molinillo/lib/molinillo/modules/ui.rb in bundler-1.16.0.pre.1
- old
+ new
@@ -1,6 +1,7 @@
# frozen_string_literal: true
+
module Bundler::Molinillo
# Conveys information about the resolution process to a user.
module UI
# The {IO} object that should be used to print output. `STDOUT`, by default.
#
@@ -46,10 +47,11 @@
# @return [void]
def debug(depth = 0)
if debug?
debug_info = yield
debug_info = debug_info.inspect unless debug_info.is_a?(String)
- output.puts debug_info.split("\n").map { |s| ' ' * depth + s }
+ debug_info = debug_info.split("\n").map { |s| ":#{depth.to_s.rjust 4}: #{s}" }
+ output.puts debug_info
end
end
# Whether or not debug messages should be printed.
# By default, whether or not the `MOLINILLO_DEBUG` environment variable is