Sha256: 688ddd334c6acf7beab804bae9399a1f45dfe3890d4519fa69f2e9a923a02f79

Contents?: true

Size: 711 Bytes

Versions: 69

Compression:

Stored size: 711 Bytes

Contents

class Specinfra::Command::Redhat::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(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
  end
end









Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
specinfra-2.14.2 lib/specinfra/command/redhat/base/package.rb
specinfra-2.14.1 lib/specinfra/command/redhat/base/package.rb
specinfra-2.14.0 lib/specinfra/command/redhat/base/package.rb
specinfra-2.13.1 lib/specinfra/command/redhat/base/package.rb
specinfra-2.13.0 lib/specinfra/command/redhat/base/package.rb
specinfra-2.12.7 lib/specinfra/command/redhat/base/package.rb
specinfra-2.12.6 lib/specinfra/command/redhat/base/package.rb
specinfra-2.12.5 lib/specinfra/command/redhat/base/package.rb
specinfra-2.12.4 lib/specinfra/command/redhat/base/package.rb
specinfra-2.12.3 lib/specinfra/command/redhat/base/package.rb
specinfra-2.12.1 lib/specinfra/command/redhat/base/package.rb
specinfra-2.12.0 lib/specinfra/command/redhat/base/package.rb
specinfra-2.11.10 lib/specinfra/command/redhat/base/package.rb
specinfra-2.11.9 lib/specinfra/command/redhat/base/package.rb
specinfra-2.11.8 lib/specinfra/command/redhat/base/package.rb
specinfra-2.11.7 lib/specinfra/command/redhat/base/package.rb
specinfra-2.11.6 lib/specinfra/command/redhat/base/package.rb
specinfra-2.11.5 lib/specinfra/command/redhat/base/package.rb
specinfra-2.11.4 lib/specinfra/command/redhat/base/package.rb
specinfra-2.11.3 lib/specinfra/command/redhat/base/package.rb