History

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

The newest Thor also contains a Terminal module, causing "uninitialized constant Thor::Shell::Terminal::Table (NameError)"

Simon Legner committed 2 years ago

Commit 8697de81 parent 55fe9b21 file · +2 −2Browse files

Unified · Split

lib/tasks/updates.thor+2−2
@@ -123,7 +123,7 @@ class UpdatesCLI < Thor · 122 unmodified lines
123 headings = ['Documentation', 'Scraper version', 'Latest version']123 headings = ['Documentation', 'Scraper version', 'Latest version']
124 rows = results.map {|result| [result[:name], result[:scraper_version], result[:latest_version]]}124 rows = results.map {|result| [result[:name], result[:scraper_version], result[:latest_version]]}
125 125
126 table = Terminal::Table.new :title => title, :headings => headings, :rows => rows126 table = ::Terminal::Table.new :title => title, :headings => headings, :rows => rows
127 puts table127 puts table
128 end128 end
129 129
@@ -132,7 +132,7 @@ class UpdatesCLI < Thor · 2 unmodified lines
132 headings = %w(Documentation Reason)132 headings = %w(Documentation Reason)
133 rows = results.map {|result| [result[:name], result[:error]]}133 rows = results.map {|result| [result[:name], result[:error]]}
134 134
135 table = Terminal::Table.new :title => title, :headings => headings, :rows => rows135 table = ::Terminal::Table.new :title => title, :headings => headings, :rows => rows
136 puts table136 puts table
137 end137 end
138 138