Class: Wright::Provider::Package::Yum
- Inherits:
-
Wright::Provider::Package
- Object
- Wright::Provider
- Wright::Provider::Package
- Wright::Provider::Package::Yum
- Defined in:
- lib/wright/provider/package/yum.rb
Overview
Yum package provider. Used as a provider for Resource::Package on Fedora-based systems.
Constant Summary
Constants inherited from Wright::Provider
Wright::Provider::PROVIDER_DIR
Instance Method Summary collapse
-
#installed_versions ⇒ Array<String>
The installed package versions.
Methods inherited from Wright::Provider::Package
#install, #installed?, #remove
Methods inherited from Wright::Provider
Constructor Details
This class inherits a constructor from Wright::Provider
Instance Method Details
#installed_versions ⇒ Array<String>
Returns the installed package versions.
13 14 15 16 17 18 |
# File 'lib/wright/provider/package/yum.rb', line 13 def installed_versions version_format = '%{VERSION}-%{RELEASE}' rpm_args = %W(-q #{package_name} --qf #{version_format}) stdout, _, status = Open3.capture3(env, 'rpm', *rpm_args) status.success? ? [stdout] : [] end |