Class: BundleUpdateInteractive::CLI
- Inherits:
-
Object
- Object
- BundleUpdateInteractive::CLI
- Defined in:
- lib/bundle_update_interactive/cli.rb,
lib/bundle_update_interactive/cli/row.rb,
lib/bundle_update_interactive/cli/table.rb,
lib/bundle_update_interactive/cli/multi_select.rb
Defined Under Namespace
Classes: MultiSelect, Options, Row, Table
Instance Method Summary collapse
-
#run(argv: ARGV) ⇒ Object
rubocop:disable Metrics/AbcSize.
Instance Method Details
#run(argv: ARGV) ⇒ Object
rubocop:disable Metrics/AbcSize
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/bundle_update_interactive/cli.rb', line 12 def run(argv: ARGV) # rubocop:disable Metrics/AbcSize = Options.parse(argv) report = generate_report() puts("No gems to update.").then { return } if report.updateable_gems.empty? puts puts legend puts selected_gems = MultiSelect.prompt_for_gems_to_update(report.updateable_gems) puts("No gems to update.").then { return } if selected_gems.empty? puts "\nUpdating the following gems." puts puts Table.new(selected_gems).render puts report.bundle_update!(*selected_gems.keys) rescue Exception => e # rubocop:disable Lint/RescueException handle_exception(e) end |