Sha256: 2ae1a0085cc713cbf42abc665323887a0bdebf11f295f892c90156626ed85ecc
Contents?: true
Size: 807 Bytes
Versions: 2
Compression:
Stored size: 807 Bytes
Contents
class Specinfra::Command::Nexus::Base::Package < Specinfra::Command::Linux::Base::Package class << self def check_is_installed(package, version=nil) cmd = "rpm -q #{escape(package)}" if version cmd = "#{cmd} | grep -w -- #{escape(package)}-#{escape(version)}" end cmd end alias :check_is_installed_by_rpm :check_is_installed def get_version(package, opts=nil) "rpm -qi #{package} | grep Version | awk '{print $3}'" end def install(package, version=nil, option='') if version full_package = "#{package}-#{version}" else full_package = package end cmd = "yum -y #{option} install #{full_package}" end def remove(package, option='') "yum -y #{option} remove #{package}" end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
specinfra-cisco-2.41.0 | lib/specinfra/command/nexus/base/package.rb |
specinfra-cisco-2.40.2 | lib/specinfra/command/nexus/base/package.rb |