Sha256: fc1a0de7a3d03a838566befb87cb8c1d9f55bb01e59b1a7ab381c73be377b557

Contents?: true

Size: 406 Bytes

Versions: 66

Compression:

Stored size: 406 Bytes

Contents

class Specinfra::Helper::DetectOs::Photon < Specinfra::Helper::DetectOs
  def detect
    if run_command('ls /etc/os-release').success?
      line = run_command('cat /etc/os-release').stdout
      if line =~ /ID=photon/
        family = 'photon'
        if line =~ /VERSION_ID=(\d+\.\d+|\d+)/
          release = $1
        end
        { :family => family, :release => release }
      end
    end
  end
end

Version data entries

66 entries across 66 versions & 1 rubygems

Version Path
specinfra-2.91.0 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.90.1 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.90.0 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.89.0 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.88.2 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.88.1 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.88.0 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.87.2 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.87.1 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.87.0 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.86.0 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.85.1 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.85.0 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.84.1 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.84.0 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.83.4 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.83.3 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.83.2 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.83.1 lib/specinfra/helper/detect_os/photon.rb
specinfra-2.83.0 lib/specinfra/helper/detect_os/photon.rb