Class: Bundler::Interactive::UpdateInteractive
- Inherits:
-
Plugin::API
- Object
- Plugin::API
- Bundler::Interactive::UpdateInteractive
- Defined in:
- lib/bundler/interactive/update_interactive.rb
Instance Method Summary collapse
Instance Method Details
#exec(_command, _args) ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/bundler/interactive/update_interactive.rb', line 14 def exec(_command, _args) response = prompt.multi_select( 'Select one or more gems to update:', outdated_gem_list, echo: false, per_page: 20, filter: true, cycle: true ) Update.new(response).update! if response.any? rescue TTY::Reader::InputInterrupt prompt.say('Canceling...') end |
#outdated_gem_list ⇒ Object
24 25 26 27 28 29 30 31 |
# File 'lib/bundler/interactive/update_interactive.rb', line 24 def outdated_gem_list outdated_gems.map do |gem| { name: "#{gem.name(name_padding)} #{gem.label}", value: gem.name } end end |