Skip to content

Commit

Permalink
thor updates: fix Terminal::Table from terminal-table
Browse files Browse the repository at this point in the history
The newest Thor also contains a Terminal module, causing "uninitialized constant Thor::Shell::Terminal::Table (NameError)"
  • Loading branch information
simon04 committed Jan 5, 2024
1 parent 55fe9b2 commit 8697de8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/tasks/updates.thor
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand Down

1 comment on commit 8697de8

@simon04
Copy link
Contributor Author

@simon04 simon04 commented on 8697de8 Jan 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Relevant Thor change: rails/thor#854

Please sign in to comment.