Sha256: 168842be758907cf1ba9e1bef49123f67a0207ed15fa7d6ba5346c8e59143693

Contents?: true

Size: 463 Bytes

Versions: 123

Compression:

Stored size: 463 Bytes

Contents

class Specinfra::Helper::DetectOs::Suse < Specinfra::Helper::DetectOs
  def 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

123 entries across 123 versions & 3 rubygems

Version Path
specinfra-2.43.3 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.43.2 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.43.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.43.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.42.2 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.42.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.42.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.41.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.41.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.40.2 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.40.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.40.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.39.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.39.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.38.1 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.38.0 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.37.9 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.37.8 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.37.6 lib/specinfra/helper/detect_os/suse.rb
specinfra-2.37.5 lib/specinfra/helper/detect_os/suse.rb