Module: BundleUpdateInteractive::BundlerCommands

Defined in:
lib/bundle_update_interactive/bundler_commands.rb

Class Method Summary collapse

Class Method Details

.read_updated_lockfile(*gems) ⇒ Object



13
14
15
16
17
18
19
20
# File 'lib/bundle_update_interactive/bundler_commands.rb', line 13

def read_updated_lockfile(*gems)
  command = ["#{bundle_bin.shellescape} lock --print"]
  command << "--conservative" if gems.any?
  command << "--update"
  command.push(*gems.flatten.map(&:shellescape))

  `#{command.join(" ")}`.tap { raise "bundle lock command failed" unless Process.last_status.success? }
end

.update_gems_conservatively(*gems) ⇒ Object



9
10
11
# File 'lib/bundle_update_interactive/bundler_commands.rb', line 9

def update_gems_conservatively(*gems)
  system "#{bundle_bin.shellescape} update --conservative #{gems.flatten.map(&:shellescape).join(' ')}"
end