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.10.13 lib/serverspec/helper/detect_os.rb
serverspec-0.10.12 lib/serverspec/helper/detect_os.rb
serverspec-0.10.11 lib/serverspec/helper/detect_os.rb
serverspec-0.10.10 lib/serverspec/helper/detect_os.rb
serverspec-0.10.9 lib/serverspec/helper/detect_os.rb
serverspec-0.10.8 lib/serverspec/helper/detect_os.rb
serverspec-0.10.7 lib/serverspec/helper/detect_os.rb
serverspec-0.10.6 lib/serverspec/helper/detect_os.rb
serverspec-0.10.5 lib/serverspec/helper/detect_os.rb
serverspec-0.10.4 lib/serverspec/helper/detect_os.rb
serverspec-0.10.3 lib/serverspec/helper/detect_os.rb
serverspec-0.10.2 lib/serverspec/helper/detect_os.rb
serverspec-0.10.1 lib/serverspec/helper/detect_os.rb
serverspec-0.10.0 lib/serverspec/helper/detect_os.rb
serverspec-0.9.8 lib/serverspec/helper/detect_os.rb
serverspec-0.9.7 lib/serverspec/helper/detect_os.rb
serverspec-0.9.6 lib/serverspec/helper/detect_os.rb
serverspec-0.9.5 lib/serverspec/helper/detect_os.rb
serverspec-0.9.4 lib/serverspec/helper/detect_os.rb
serverspec-0.9.3 lib/serverspec/helper/detect_os.rb