Sha256: 9f0c52e0fdf69928e2c5353ec274e826ff4a6fc0d405b798fe576055788ba417

Contents?: true

Size: 735 Bytes

Versions: 2

Compression:

Stored size: 735 Bytes

Contents

require 'boris/profiler'
require 'boris/profilers/windows_core'

module Boris; module Profilers
  class Windows2008 < Windows

    def self.matches_target?(connector)
      return true if connector.value_at('SELECT Name FROM Win32_OperatingSystem')[:name] =~ /2008/
    end

    def get_operating_system
      super
      get_operating_system_features
    end

    private

    def get_operating_system_features
      # grab the 'features' from win2008 servers, as it's only available on this version
      # and already deprecated as of win2012
      @operating_system[:features] = @connector.values_at('SELECT Name FROM Win32_ServerFeature').map {|f| f[:name]}

      @operating_system
    end
  end
end; end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
boris-1.0.2 lib/boris/profilers/windows/windows2008.rb
boris-1.0.1 lib/boris/profilers/windows/windows2008.rb