Module: BundleUpdateInteractive::BundlerCommands

Defined in:
lib/bundle_update_interactive/bundler_commands.rb

Class Method Summary collapse

Class Method Details

.read_updated_lockfile(*gems) ⇒ Object



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

def read_updated_lockfile(*gems)
  command = ["bundle 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



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

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