Sha256: ed149317062a9975ac3e75e966d3e05944e6a618d29c3662161e6e351b81eaab

Contents?: true

Size: 781 Bytes

Versions: 39

Compression:

Stored size: 781 Bytes

Contents

class PEBuild::Cap::DetectInstaller::Base

  def self.detect_installer(machine, version)
    new(machine, version).detect
  end

  def initialize(machine, version)
    @machine, @version = machine, version
  end

  # @!method detect
  #   Return the installer for the given operating system
  #   @abstract
  #   @return [String] The installer for the given operating system

  private

  # TODO: Consolidate with implementation in Cap::Facts::Base.
  def execute_command(cmd)
    stdout = ''
    stderr = ''

    retval = @machine.communicate.execute(cmd, :error_check => false) do |type, data|
      if type == :stderr
        stderr << data
      else
        stdout << data
      end
    end

    {:stdout => stdout.chomp, :stderr => stderr.chomp, :retval => retval}
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
vagrant-pe_build-0.19.2 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.19.1 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.19.0 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.18.2 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.18.1 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.18.0 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.17.14 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.17.13 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.17.12 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.17.11 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.17.10 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.17.9 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.17.8 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.17.7 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.17.6 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.17.5 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.17.4 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.17.3 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.17.2 lib/pe_build/cap/detect_installer/base.rb
vagrant-pe_build-0.17.1 lib/pe_build/cap/detect_installer/base.rb