Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing summarize method. #3255

Merged
merged 1 commit into from
Oct 2, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def to_h
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
Expand Down
4 changes: 4 additions & 0 deletions Library/Homebrew/cask/lib/hbc/artifact/nested_container.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ def install_phase(**options)

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)

Expand Down