Sha256: 598666647ff06f1d04e84e0279dfeb981df4aa8ef4386614aa8205009d616e8c

Contents?: true

Size: 527 Bytes

Versions: 1

Compression:

Stored size: 527 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.check_os
          property[:os_by_host][host] = os
        end
        self.class.const_get('SpecInfra').const_get('Command').const_get(os[:family]).new
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
specinfra-0.0.10 lib/specinfra/helper/detect_os.rb