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.6.29 lib/serverspec/helper/detect_os.rb
serverspec-0.6.28 lib/serverspec/helper/detect_os.rb
serverspec-0.6.27 lib/serverspec/helper/detect_os.rb
serverspec-0.6.26 lib/serverspec/helper/detect_os.rb
serverspec-0.6.25 lib/serverspec/helper/detect_os.rb
serverspec-0.6.24 lib/serverspec/helper/detect_os.rb
serverspec-0.6.23 lib/serverspec/helper/detect_os.rb
serverspec-0.6.22 lib/serverspec/helper/detect_os.rb
serverspec-0.6.21 lib/serverspec/helper/detect_os.rb
serverspec-0.6.20 lib/serverspec/helper/detect_os.rb
serverspec-0.6.19 lib/serverspec/helper/detect_os.rb
serverspec-0.6.18 lib/serverspec/helper/detect_os.rb
serverspec-0.6.17 lib/serverspec/helper/detect_os.rb
serverspec-0.6.16 lib/serverspec/helper/detect_os.rb
serverspec-0.6.15 lib/serverspec/helper/detect_os.rb
serverspec-0.6.13 lib/serverspec/helper/detect_os.rb
serverspec-0.6.12 lib/serverspec/helper/detect_os.rb
serverspec-0.6.11 lib/serverspec/helper/detect_os.rb
serverspec-0.6.10 lib/serverspec/helper/detect_os.rb
serverspec-0.6.9 lib/serverspec/helper/detect_os.rb