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

Print URL to console #162

Merged
merged 2 commits into from
May 17, 2020
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/extend/cask.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def self.installed_apps
:current => versions,
:outdated? => cask.instance_of?(Cask) && !versions.include?(cask.version.to_s),
:auto_updates => cask.auto_updates,
:homepage => cask.homepage,
}
rescue CaskUnavailableError
{
Expand All @@ -30,6 +31,7 @@ def self.installed_apps
:current => versions,
:outdated? => false,
:auto_updates => false,
:homepage => nil,
}
end
end
Expand Down
6 changes: 6 additions & 0 deletions lib/extend/formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ def print_app_table(apps, state_info, options)
table.add_header_column "Latest"
table.add_header_column "A/U"
table.add_header_column "Result", "center"
if options.verbose
table.add_header_column "URL"
end

apps.each_with_index do |app, i|
color, result = formatting_for_app(state_info, app, options).values_at(0, 1)
Expand All @@ -140,6 +143,9 @@ def print_app_table(apps, state_info, options)
row << self::TableColumn.new(:value => app[:version], :color => "magenta")
row << self::TableColumn.new(:value => app[:auto_updates] ? " Y " : "", :color => "magenta")
row << self::TableColumn.new(:value => result, :color => color)
if options.verbose
row << self::TableColumn.new(:value => app[:homepage], :color => "blue")
end
table.add_row row
end

Expand Down