Sha256: 8bda76385b7148a233ecf2b0808b4f0327d711b3d6da99cbe164c267eee871c4

Contents?: true

Size: 507 Bytes

Versions: 67

Compression:

Stored size: 507 Bytes

Contents

module Serverspec
  module Helper
    module DetectOS
      def commands
        attr[:os_type] = {} if ! attr[:os_type]
        host = RSpec.configuration.ssh ? RSpec.configuration.ssh.host : 'localhost'

        if attr[:os_type][host]
          os = attr[:os_type][host]
        else
          os = backend(Serverspec::Commands::Base).check_os
          attr[:os_type][host] = os
        end

        self.class.const_get('Serverspec').const_get('Commands').const_get(os).new
      end
    end
  end
end

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
serverspec-0.9.2 lib/serverspec/helper/detect_os.rb
serverspec-0.9.1 lib/serverspec/helper/detect_os.rb
serverspec-0.9.0 lib/serverspec/helper/detect_os.rb
serverspec-0.8.1 lib/serverspec/helper/detect_os.rb
serverspec-0.8.0 lib/serverspec/helper/detect_os.rb
serverspec-0.7.13 lib/serverspec/helper/detect_os.rb
serverspec-0.7.12 lib/serverspec/helper/detect_os.rb
serverspec-0.7.11 lib/serverspec/helper/detect_os.rb
serverspec-0.7.10 lib/serverspec/helper/detect_os.rb
serverspec-0.7.9 lib/serverspec/helper/detect_os.rb
serverspec-0.7.8 lib/serverspec/helper/detect_os.rb
serverspec-0.7.7 lib/serverspec/helper/detect_os.rb
serverspec-0.7.6 lib/serverspec/helper/detect_os.rb
serverspec-0.7.5 lib/serverspec/helper/detect_os.rb
serverspec-0.7.4 lib/serverspec/helper/detect_os.rb
serverspec-0.7.3 lib/serverspec/helper/detect_os.rb
serverspec-0.7.2 lib/serverspec/helper/detect_os.rb
serverspec-0.7.1 lib/serverspec/helper/detect_os.rb
serverspec-0.7.0 lib/serverspec/helper/detect_os.rb
serverspec-0.6.30 lib/serverspec/helper/detect_os.rb