Sha256: 00b38e1c259f6239c52ce61b640bb9338664f260e0f9bdd6efb7bbfbc1339767

Contents?: true

Size: 627 Bytes

Versions: 1

Compression:

Stored size: 627 Bytes

Contents

# frozen_string_literal: true

require "shellwords"

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

      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
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bundle_update_interactive-0.4.0 lib/bundle_update_interactive/bundler_commands.rb