Sha256: ae96890c851485d46b42b7733e3733f5364d009e198d2d6300820f17c6c4c907
Contents?: true
Size: 599 Bytes
Versions: 2
Compression:
Stored size: 599 Bytes
Contents
module SpecInfra module Helper module DetectOS def commands property[:os_by_host] = {} if ! property[:os_by_host] host = SpecInfra.configuration.ssh ? SpecInfra.configuration.ssh.host : 'localhost' if property[:os_by_host][host] os = property[:os_by_host][host] else os = backend(self.class.const_get(SPEC_TYPE).const_get('Commands').const_get('Base')).check_os property[:os_by_host][host] = os end self.class.const_get(SPEC_TYPE).const_get('Commands').const_get(os[:family]).new end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
specinfra-0.0.5 | lib/specinfra/helper/detect_os.rb |
specinfra-0.0.4 | lib/specinfra/helper/detect_os.rb |