From da66e06068e73ea212feaf6657c37e96f6bcde2c Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Sun, 1 Oct 2017 23:33:52 +0200 Subject: [PATCH] Add missing `summarize` method. --- Library/Homebrew/cask/lib/hbc/artifact/abstract_uninstall.rb | 2 +- Library/Homebrew/cask/lib/hbc/artifact/nested_container.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Library/Homebrew/cask/lib/hbc/artifact/abstract_uninstall.rb b/Library/Homebrew/cask/lib/hbc/artifact/abstract_uninstall.rb index badd549ce7..19b83b69bb 100644 --- a/Library/Homebrew/cask/lib/hbc/artifact/abstract_uninstall.rb +++ b/Library/Homebrew/cask/lib/hbc/artifact/abstract_uninstall.rb @@ -37,7 +37,7 @@ module Hbc end def summarize - to_h.map { |key, val| [*val].map { |v| "#{key.inspect} => #{v.inspect}" }.join(", ") }.join(", ") + to_h.flat_map { |key, val| [*val].map { |v| "#{key.inspect} => #{v.inspect}" } }.join(", ") end private diff --git a/Library/Homebrew/cask/lib/hbc/artifact/nested_container.rb b/Library/Homebrew/cask/lib/hbc/artifact/nested_container.rb index 81adf90290..c9fd3dc271 100644 --- a/Library/Homebrew/cask/lib/hbc/artifact/nested_container.rb +++ b/Library/Homebrew/cask/lib/hbc/artifact/nested_container.rb @@ -16,6 +16,10 @@ module Hbc private + def summarize + path.relative_path_from(cask.staged_path).to_s + end + def extract(command: nil, verbose: nil, **_) container = Container.for_path(path, command)