Sha256: 4b75aae4f44d6ec2b51aad4ac55b6b27ced9edec8ee65586d98ac496ee086eb3

Contents?: true

Size: 468 Bytes

Versions: 127

Compression:

Stored size: 468 Bytes

Contents

class Specinfra::Helper::DetectOs::Suse < Specinfra::Helper::DetectOs
  def self.detect
    if run_command('ls /etc/SuSE-release').success?
      line = run_command('cat /etc/SuSE-release').stdout
      if line =~ /SUSE Linux Enterprise Server (\d+)/
        release = $1
        family = 'suse'
      elsif line =~ /openSUSE (\d+\.\d+|\d+)/
        release = $1
        family = 'opensuse'
      end
      { :family => family, :release => release }
    end
  end
end

Version data entries

127 entries across 127 versions & 1 rubygems

Version Path
specinfra-2.0.0.beta13 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.0.0.beta12 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.0.0.beta11 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.0.0.beta10 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.0.0.beta9 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.0.0.beta8 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.0.0.beta7 lib/specinfra/helper/detect_os/suse.rb