Sha256: 600273715f9ee82c1aa8dd092d8a12c4cbfca0bfe5958c18dbf74e4fc7f2ac90
Contents?: true
Size: 705 Bytes
Versions: 1
Compression:
Stored size: 705 Bytes
Contents
require 'specinfra/helper/detect_os' module Specinfra module Helper module Os def os property[:os] = {} if ! property[:os] if ! property[:os].include?(:family) property[:os] = detect_os end property[:os] end private def detect_os return Specinfra.configuration.os if Specinfra.configuration.os Specinfra::Helper::DetectOs.subclasses.each do |c| res = c.detect if res res[:arch] ||= Specinfra.backend.run_command('uname -m').stdout.strip return res end end raise NotImplementedError, "Specinfra failed os detection." end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
specinfra-2.34.3 | lib/specinfra/helper/os.rb |