Add Cask#outdated_info to format output
This commit is contained in:
parent
d5ab6534c0
commit
65ff9155f8
@ -122,6 +122,21 @@ module Cask
|
|||||||
installed.reject { |v| v == version }
|
installed.reject { |v| v == version }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def outdated_info(greedy, verbose, json)
|
||||||
|
if json
|
||||||
|
{
|
||||||
|
name: token,
|
||||||
|
installed_versions: outdated_versions(greedy).join(", "),
|
||||||
|
current_version: version
|
||||||
|
}
|
||||||
|
elsif verbose
|
||||||
|
outdated_info = token << " (#{outdated_versions(greedy).join(", ")})"
|
||||||
|
"#{outdated_info} != #{version}"
|
||||||
|
else
|
||||||
|
token
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def to_s
|
def to_s
|
||||||
@token
|
@token
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user