No description, website, or topics provided.
Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is 1 commit behind railsmachine:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
examples
lib
spec
.gitignore
LICENSE
Rakefile
Readme.rdoc
shadow_facter.gemspec

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