Module: PSWindows::Pkg
Instance Attribute Summary
Attributes included from Beaker::CommandFactory
Instance Method Summary collapse
- #check_for_command(name) ⇒ Object
- #check_for_package(name) ⇒ Object
- #install_package(name, cmdline_args = '') ⇒ Object
- #uninstall_package(name, cmdline_args = '') ⇒ Object
Methods included from Beaker::CommandFactory
Instance Method Details
#check_for_command(name) ⇒ Object
4 5 6 7 |
# File 'lib/beaker/host/pswindows/pkg.rb', line 4 def check_for_command(name) result = exec(Beaker::Command.new("where #{name}"), :acceptable_exit_codes => (0...127)) result.exit_code == 0 end |
#check_for_package(name) ⇒ Object
9 10 11 |
# File 'lib/beaker/host/pswindows/pkg.rb', line 9 def check_for_package(name) raise "Cannot check for package #{name} on #{self}" end |
#install_package(name, cmdline_args = '') ⇒ Object
13 14 15 |
# File 'lib/beaker/host/pswindows/pkg.rb', line 13 def install_package(name, cmdline_args = '') raise "Package #{name} cannot be installed on #{self}" end |
#uninstall_package(name, cmdline_args = '') ⇒ Object
17 18 19 |
# File 'lib/beaker/host/pswindows/pkg.rb', line 17 def uninstall_package(name, cmdline_args = '') raise "Package #{name} cannot be uninstalled on #{self}" end |