Class: AutomateIt::PlatformManager::LSB
- Inherits:
-
Uname
- Object
- Common
- AutomateIt::Plugin::Base
- AutomateIt::Plugin::Driver
- BaseDriver
- Struct
- Uname
- AutomateIt::PlatformManager::LSB
- Defined in:
- lib/automateit/platform_manager/lsb.rb
Overview
PlatformManager::LSB
A PlatformManager driver for LSB (Linux Standards Base) systems. The platform doesn’t actually need to be Linux, but simply has to provide an lsb_release
command.
Constant Summary collapse
- LSB_RELEASE =
"lsb_release"
Constants inherited from AutomateIt::Plugin::Driver
AutomateIt::Plugin::Driver::BASE_DRIVER_NAME
Constants included from Constants
Constants::HELPERS_DIR, Constants::INSTALL_DIR, Constants::PERROR, Constants::PEXEC, Constants::PNOTE, Constants::WARNING_BOILERPLATE
Instance Attribute Summary
Attributes inherited from Struct
Attributes inherited from AutomateIt::Plugin::Driver
Attributes inherited from Common
Instance Method Summary collapse
-
#setup(opts = {}) ⇒ Object
:nodoc:.
-
#suitability(method, *args) ⇒ Object
:nodoc:.
Methods inherited from Struct
#query, #single_vendor?, #tags
Methods inherited from AutomateIt::Plugin::Driver
abstract_driver, #available?, base_driver, base_driver?, depends_on, inherited, manager_token
Methods inherited from AutomateIt::Plugin::Base
Methods inherited from Common
#initialize, #log, #nitpick, #noop, #noop=, #noop?, #preview, #preview=, #preview?, #preview_for, #superuser?, #writing, #writing=, #writing?
Constructor Details
This class inherits a constructor from AutomateIt::Common
Instance Method Details
#setup(opts = {}) ⇒ Object
:nodoc:
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/automateit/platform_manager/lsb.rb', line 16 def setup(opts={}) # :nodoc: super(opts) # Rely on Uname to set :os and :arch @struct[:distro] ||= @@struct_cache[:distro] @struct[:release] ||= @@struct_cache[:release] if available? unless @struct[:distro] and @struct[:release] hash = _parse_lsb_release_data(_read_lsb_release_data) @struct[:distro] ||= @@struct_cache[:distro] ||= hash["Distributor ID"].to_s.downcase @struct[:release] ||= @@struct_cache[:release] ||= hash["Release"].to_s.downcase end end end |
#suitability(method, *args) ⇒ Object
:nodoc:
11 12 13 14 |
# File 'lib/automateit/platform_manager/lsb.rb', line 11 def suitability(method, *args) # :nodoc: # Level must be greater than Uname and Debian return available? ? 4 : 0 end |