thor updates: fix Terminal::Table from terminal-table

The newest Thor also contains a Terminal module, causing "uninitialized constant Thor::Shell::Terminal::Table (NameError)"
This commit is contained in:
Simon Legner 2024-01-05 20:30:27 +01:00
parent 55fe9b2d5a
commit 8697de8567

View file

@ -123,7 +123,7 @@ class UpdatesCLI < Thor
headings = ['Documentation', 'Scraper version', 'Latest version']
rows = results.map {|result| [result[:name], result[:scraper_version], result[:latest_version]]}
table = Terminal::Table.new :title => title, :headings => headings, :rows => rows
table = ::Terminal::Table.new :title => title, :headings => headings, :rows => rows
puts table
end
@ -132,7 +132,7 @@ class UpdatesCLI < Thor
headings = %w(Documentation Reason)
rows = results.map {|result| [result[:name], result[:error]]}
table = Terminal::Table.new :title => title, :headings => headings, :rows => rows
table = ::Terminal::Table.new :title => title, :headings => headings, :rows => rows
puts table
end