Class: RSpecSystem::Helpers::Facter
- Inherits:
-
RSpecSystem::Helper
- Object
- RSpecSystem::Helper
- RSpecSystem::Helpers::Facter
- Defined in:
- lib/rspec-system-puppet/helpers/facter.rb
Overview
Helper object behind RSpecSystemPuppet::Helpers#facter
Instance Method Summary collapse
-
#execute ⇒ RSpecSystem::Result
Gathers new results by executing the resource action.
Instance Method Details
#execute ⇒ RSpecSystem::Result
Gathers new results by executing the resource action
14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/rspec-system-puppet/helpers/facter.rb', line 14 def execute node = opts[:node] sh = shell :c => "facter -y", :n => node rd = sh.to_hash rd[:facts] = begin YAML::load(sh.stdout) rescue end rd end |