Module: Beaker::DSL::Wrappers

Defined in:
lib/beaker-facter/helpers.rb

Overview

These are wrappers to equivalent Command objects so that command line actions are executed within an appropriate and configurable environment.

I find most of these adapters of suspicious value and have deprecated many of them.

Instance Method Summary collapse

Instance Method Details

#cfacter(*args) ⇒ Object

This is hairy and because of legacy code it will take a bit more work to disentangle all of the things that are being passed into this catchall param.



26
27
28
29
30
31
# File 'lib/beaker-facter/helpers.rb', line 26

def cfacter(*args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  options['ENV'] ||= {}
  options[:cmdexe] = true
  Command.new('cfacter', args, options )
end

#facter(*args) ⇒ Object

This is hairy and because of legacy code it will take a bit more work to disentangle all of the things that are being passed into this catchall param.



15
16
17
18
19
20
# File 'lib/beaker-facter/helpers.rb', line 15

def facter(*args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  options['ENV'] ||= {}
  options[:cmdexe] = true
  Command.new('facter', args, options )
end