Sha256: df5ed6beeb251907f6e43eafdaf142c7917428a4fd81537882d2d15a423e4742

Contents?: true

Size: 1.22 KB

Versions: 95

Compression:

Stored size: 1.22 KB

Contents

# Fact: macosx
#
# Purpose:
#   Returns a number of Mac specific facts, from system profiler and
#   sw_vers.
#
# Resolution:
#   Uses util/macosx.rb to do the fact reconnaissance, then outputs them
#   preceded by `sp_`
#
# Caveats:
#

#
# macosx.rb
# Additional Facts coming from Mac OS X system_profiler command
#
# Copyright (C) 2007 Jeff McCune
# Author: Jeff McCune <jeff.mccune@northstarlabs.net>
#
# Jeff McCune
# There's a lot more information coming out of system_profiler -xml
# We could add quite a bit more, but I didn't want to overload facter
# at this point in time.
# In particular, Installed Software might be an interesting addition.

if Facter.value(:kernel) == "Darwin"
  require 'facter/util/macosx'

  Facter::Util::Macosx.hardware_overview.each do |fact, value|
    Facter.add("sp_#{fact}") do
      confine :kernel => :darwin
      setcode do
        value
      end
    end
  end

  Facter::Util::Macosx.os_overview.each do |fact, value|
    Facter.add("sp_#{fact}") do
      confine :kernel => :darwin
      setcode do
        value
      end
    end
  end

  Facter::Util::Macosx.sw_vers.each do |fact, value|
    Facter.add(fact) do
      confine :kernel => :darwin
      setcode do
        value
      end
    end
  end
end

Version data entries

95 entries across 95 versions & 2 rubygems

Version Path
facter-2.5.7 lib/facter/macosx.rb
facter-2.5.7-x86-mingw32 lib/facter/macosx.rb
facter-2.5.7-x64-mingw32 lib/facter/macosx.rb
facter-2.5.7-universal-darwin lib/facter/macosx.rb
facter-2.5.6-x86-mingw32 lib/facter/macosx.rb
facter-2.5.6-x64-mingw32 lib/facter/macosx.rb
facter-2.5.6-universal-darwin lib/facter/macosx.rb
facter-2.5.6 lib/facter/macosx.rb
facter-2.5.5-x86-mingw32 lib/facter/macosx.rb
facter-2.5.5-x64-mingw32 lib/facter/macosx.rb
facter-2.5.5-universal-darwin lib/facter/macosx.rb
facter-2.5.5 lib/facter/macosx.rb
facter-2.5.4-x86-mingw32 lib/facter/macosx.rb
facter-2.5.4-x64-mingw32 lib/facter/macosx.rb
facter-2.5.4-universal-darwin lib/facter/macosx.rb
facter-2.5.4 lib/facter/macosx.rb
bolt-0.24.0 vendored/facter/lib/facter/macosx.rb
bolt-0.23.0 vendored/facter/lib/facter/macosx.rb
bolt-0.22.0 vendored/facter/lib/facter/macosx.rb
bolt-0.21.8 vendored/facter/lib/facter/macosx.rb