Sha256: 56568bc4eb8fdc226444e43000adedfc9288200954c817cf7abf2149dee0b4a4
Contents?: true
Size: 898 Bytes
Versions: 39
Compression:
Stored size: 898 Bytes
Contents
require_relative 'posix' # Facts implementation for SUSE guests # # @since 0.13.0 class PEBuild::Cap::Facts::SUSE < PEBuild::Cap::Facts::POSIX # (see PEBuild::Cap::Facts::Base#os_info) # # Returns `family` as `SUSE` and `name` as `SLES`. # # @see PEBuild::Cap::Facts::Base#os_info def os_info { 'name' => 'SLES', 'family' => 'SUSE' } end # (see PEBuild::Cap::Facts::Base#release_info) # # Reads `/etc/SuSE-release` and generates a `full` version along with # `major` and `minor` components. # # @see PEBuild::Cap::Facts::Base#release_info def release_info release_file = sudo('cat /etc/SuSE-release')[:stdout] major = release_file.match(/VERSION\s*=\s*(\d+)/)[1] minor = release_file.match(/PATCHLEVEL\s*=\s*(\d+)/)[1] { 'major' => major, 'minor' => minor, 'full' => [major, minor].join('.') } end end
Version data entries
39 entries across 39 versions & 1 rubygems