public
Description: ShadowFacter is a Ruby DSL for Facter
Homepage: http://railsmachine.github.com/shadow_facter/
Clone URL: git://github.com/railsmachine/shadow_facter.git
jnewland (author)
Fri Feb 20 07:32:07 -0800 2009
commit  1be024b343a22f1e8942213db7a5a0e0de1b7fa9
tree    29a2b0423834ded471eb2c26c00a36e6046496ff
parent  6a74e1ce7183d709a06da7361c6ad9099d48f0b3
Readme.rdoc

ShadowFacter

ShadowFacter is a Ruby DSL for Facter, extracted out of the work we at Rails Machine are doing on Moonshine.

ShadowFacter provides a DSL for creating facts and processing them using Facter. A binary is provided to parse facts.

Example:

 $ cat examples/lib/facts/kernel.rb
  require 'shadow_facter'

  namespace :kernel do
    fact :name do
      exec "uname -s"
    end

    fact :release do
      exec "uname -r"
    end

    fact :version do
      value(:release).to_s.split('.')[0]
    end
  end

Executing this fact:

 $ bin/shadow_facter examples/lib/facts/kernel.rb
 kernel_name => Darwin
 kernel_version => 9
 kernel_release => 9.6.0