Sha256: 3d95e2d9733682aedcc15a83d9a5c5d262e12c5e31ad7d6da0d6accc4d8fadfa
Contents?: true
Size: 532 Bytes
Versions: 109
Compression:
Stored size: 532 Bytes
Contents
require 'specinfra/helper/detect_os' module Specinfra::Helper::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 end end
Version data entries
109 entries across 109 versions & 1 rubygems