Class: Specinfra::Command::Windows::Base::Package
- Inherits:
-
Specinfra::Command::Windows::Base
- Object
- Specinfra::Command::Windows::Base
- Specinfra::Command::Windows::Base::Package
- Defined in:
- lib/specinfra/command/windows/base/package.rb
Class Method Summary collapse
- .check_is_installed(package, version = nil) ⇒ Object
- .check_is_installed_by_gem(name, version = nil, gem_binary = "gem") ⇒ Object
Methods inherited from Specinfra::Command::Windows::Base
Class Method Details
.check_is_installed(package, version = nil) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/specinfra/command/windows/base/package.rb', line 3 def check_is_installed(package, version=nil) version_selection = version.nil? ? "" : "-appVersion '#{version}'" Backend::PowerShell::Command.new do using 'find_installed_application.ps1' exec "(FindInstalledApplication -appName '#{package}' #{version_selection}) -eq $true" end end |
.check_is_installed_by_gem(name, version = nil, gem_binary = "gem") ⇒ Object
11 12 13 14 15 16 17 |
# File 'lib/specinfra/command/windows/base/package.rb', line 11 def check_is_installed_by_gem(name, version=nil, gem_binary="gem") version_selection = version.nil? ? "" : "-gemVersion '#{version}'" Backend::PowerShell::Command.new do using 'find_installed_gem.ps1' exec "(FindInstalledGem -gemName '#{name}' #{version_selection}) -eq $true" end end |