class Specinfra::Helper::DetectOs::Photon
Public Instance Methods
detect()
click to toggle source
# File lib/specinfra/helper/detect_os/photon.rb, line 2 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