Class: RightScale::Platform::Installer

Inherits:
PlatformHelperBase show all
Defined in:
lib/right_agent/platform.rb,
lib/right_agent/platform/windows/platform.rb,
lib/right_agent/platform/unix/linux/platform.rb,
lib/right_agent/platform/unix/darwin/platform.rb

Overview

Controller

Defined Under Namespace

Classes: PackageManagerNotFound, PackageNotFound

Constant Summary

Constants inherited from PlatformHelperBase

PlatformHelperBase::API_FALSE, PlatformHelperBase::API_NULL, PlatformHelperBase::API_TRUE, PlatformHelperBase::SIZEOF_DWORD, PlatformHelperBase::SIZEOF_QWORD, PlatformHelperBase::WIDE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from PlatformHelperBase

#copy_to_string_buffer, #with_unicode_buffer

Constructor Details

#initializeInstaller

Returns a new instance of Installer.



622
623
624
# File 'lib/right_agent/platform.rb', line 622

def initialize
  @output = nil
end

Instance Attribute Details

#outputString

Returns installer output or nil.

Returns:

  • (String)

    installer output or nil



620
621
622
# File 'lib/right_agent/platform.rb', line 620

def output
  @output
end

Instance Method Details

#aptitude?TrueClass|FalseClass

Does this machine have aptitude?

Returns:

  • (TrueClass|FalseClass)

    true if aptitude is available in the expected directory



203
204
205
# File 'lib/right_agent/platform/unix/linux/platform.rb', line 203

def aptitude?
  ::File.executable? '/usr/bin/apt-get'
end

#install(packages) ⇒ Object

Overrides base Installer#install

Raises:

  • (::NotImplementedError)


638
639
640
# File 'lib/right_agent/platform.rb', line 638

def install(packages)
  must_be_overridden
end

#yum?TrueClass|FalseClass

Does this machine have yum?

Returns:

  • (TrueClass|FalseClass)

    true if yum is available in the expected directory



210
211
212
# File 'lib/right_agent/platform/unix/linux/platform.rb', line 210

def yum?
  ::File.executable? '/usr/bin/yum'
end

#zypper?TrueClass|FalseClass

Does this machine have zypper?

Returns:

  • (TrueClass|FalseClass)

    true if zypper is available in the expected directory



217
218
219
# File 'lib/right_agent/platform/unix/linux/platform.rb', line 217

def zypper?
  ::File.executable? '/usr/bin/zypper'
end