Sha256: 4d4978568b58ec89efadf647f5a0b4c4eabcd263233b5a5c735f918d9777e4a0

Contents?: true

Size: 591 Bytes

Versions: 1

Compression:

Stored size: 591 Bytes

Contents

require "open3"

module Bundleup
  class BundleCommands
    include Console

    def outdated
      run(%w(bundle outdated), true)
    end

    def show
      run(%w(bundle show))
    end

    def update(args=[])
      run(%w(bundle update) + args)
    end

    private

    def run(cmd, fail_silently=false)
      cmd_line = cmd.join(" ")
      progress("Running `#{cmd_line}`") do
        out, err, status = Open3.capture3(*cmd)
        next(out) if status.success? || fail_silently
        raise ["Failed to execute: #{cmd_line}", out, err].compact.join("\n")
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bundleup-0.5.0 lib/bundleup/bundle_commands.rb