Class: Babushka::RedhatSystemProfile

Inherits:
LinuxSystemProfile show all
Defined in:
lib/babushka/system_profile.rb

Direct Known Subclasses

CentOSSystemProfile, FedoraSystemProfile

Instance Method Summary collapse

Methods inherited from LinuxSystemProfile

#cpus, #public_ip, #system_str, #total_memory

Methods inherited from SystemProfile

#bsd?, #codename, #codename_str, #cpu_type, #cpus, #definition, #description, #differentiator_for, #flavour, #hostname, #library_ext, #linux?, #match_list, #matcher, #matches?, #osx?, #pkg_helper_key, #pkg_helper_str, #public_ip, #system, #system_description, #total_memory, #version_info

Methods included from ShellHelpers

cmd_dir, current_username, log_shell, login_shell, raw_shell, shell, shell!, shell?, shell_cmd, sudo, which

Methods included from LogHelpers

debug, deprecated!, log, log_block, log_error, log_ok, log_stderr, log_warn, removed!

Instance Method Details

#flavour_strObject


168
# File 'lib/babushka/system_profile.rb', line 168

def flavour_str; 'Red Hat' end

#get_version_infoObject


177
# File 'lib/babushka/system_profile.rb', line 177

def get_version_info; File.read('/etc/redhat-release') end

#pkg_helperObject


178
# File 'lib/babushka/system_profile.rb', line 178

def pkg_helper; YumHelper end

#releaseObject


173
174
175
# File 'lib/babushka/system_profile.rb', line 173

def release
  version[/^(\d+)/, 1]
end

#versionObject


170
171
172
# File 'lib/babushka/system_profile.rb', line 170

def version
  version_info[/release ([\d\.]+)/i, 1]
end