Module: Beaker::DSL::Wrappers
- Included in:
- Beaker::DSL
- Defined in:
- lib/beaker/dsl/wrappers.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
-
#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.
-
#hiera(*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.
-
#puppet(*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.
Instance Method Details
#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.
16 17 18 19 20 21 |
# File 'lib/beaker/dsl/wrappers.rb', line 16 def facter(*args) = args.last.is_a?(Hash) ? args.pop : {} ['ENV'] ||= {} ['ENV'] = ['ENV'].merge( Command::DEFAULT_GIT_ENV ) Command.new('facter', args, ) end |
#hiera(*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.
28 29 30 31 32 33 |
# File 'lib/beaker/dsl/wrappers.rb', line 28 def hiera(*args) = args.last.is_a?(Hash) ? args.pop : {} ['ENV'] ||= {} ['ENV'] = ['ENV'].merge( Command::DEFAULT_GIT_ENV ) Command.new('hiera', args, ) end |
#puppet(*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.
49 50 51 52 53 54 55 56 57 |
# File 'lib/beaker/dsl/wrappers.rb', line 49 def puppet(*args) = args.last.is_a?(Hash) ? args.pop : {} ['ENV'] ||= {} ['ENV'] = ['ENV'].merge( Command::DEFAULT_GIT_ENV ) # we assume that an invocation with `puppet()` will have it's first argument # a face or sub command cmd = "puppet #{args.shift}" Command.new( cmd, args, ) end |