func (f commandFactory) CreateBundleInstall(bundlerVersion string, opts *command.Opts) command.Command {
	a := bundleCommandArgs([]string{"install", "--jobs", "20", "--retry", "5"}, bundlerVersion)
	return f.Create("bundle", a, opts)
}
CreateBundleInstall returns a command to install a bundle using bundler
package ruby
import (
	"errors"
	"strings"
	"github.com/bitrise-io/go-utils/command"
	"github.com/bitrise-io/go-utils/env"
)
type CommandFactory interface {
	Create(name string, args []string, opts *command.Opts) command.Command
	CreateBundleExec(name string, args []string, bundlerVersion string, opts *command.Opts) command.Command
	CreateBundleInstall(bundlerVersion string, opts *command.Opts) command.Command
	CreateGemInstall(gem, version string, enablePrerelease, force bool, opts *command.Opts) []command.Command
	CreateGemUpdate(gem string, opts *command.Opts) []command.Command
}
type commandFactory struct {
	cmdFactory  command.Factory
	installType InstallType
}
func NewCommandFactory(cmdFactory command.Factory, cmdLocator env.CommandLocator) (CommandFactory, error) {
	installType := rubyInstallType(cmdLocator)
	if installType == Unknown {
		return nil, errors.New("unknown Ruby installation")
	}
	return commandFactory{
		cmdFactory:  cmdFactory,
		installType: installType,
	}, nil
}
func (f commandFactory) Create(name string, args []string, opts *command.Opts) command.Command {
	s := append([]string{name}, args...)
	if sudoNeeded(f.installType, s...) {
		return f.cmdFactory.Create("sudo", s, opts)
	}
	return f.cmdFactory.Create(name, args, opts)
}
func (f commandFactory) CreateBundleExec(name string, args []string, bundlerVersion string, opts *command.Opts) command.Command {
	a := bundleCommandArgs(append([]string{"exec", name}, args...), bundlerVersion)
	return f.Create("bundle", a, opts)
}