Sha256: 230c88daa8e7c79e5be71f2a6380cef3d098112bace51e54a30dc5bafa8de84c
Contents?: true
Size: 591 Bytes
Versions: 2
Compression:
Stored size: 591 Bytes
Contents
module SpecInfra module Helper module DetectOS def commands property[:os_by_host] = {} if ! property[:os_by_host] host = RSpec.configuration.ssh ? RSpec.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.3 | lib/specinfra/helper/detect_os.rb |
specinfra-0.0.2 | lib/specinfra/helper/detect_os.rb |