Sha256: 0fe22ec9b66def7cc0e29d183c8754f01529640846287c706971433ccb7c5013

Contents?: true

Size: 302 Bytes

Versions: 7

Compression:

Stored size: 302 Bytes

Contents

class LinuxAdmin
  class Rpm < LinuxAdmin
    def self.list_installed
      out = run!("rpm -qa --qf \"%{NAME} %{VERSION}-%{RELEASE}\n\"").output
      out.split("\n").each_with_object({}) do |line, pkg_hash|
        name, ver = line.split(" ")
        pkg_hash[name] = ver
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
linux_admin-0.4.1 lib/linux_admin/rpm.rb
linux_admin-0.4.0 lib/linux_admin/rpm.rb
linux_admin-0.3.0 lib/linux_admin/rpm.rb
linux_admin-0.2.3 lib/linux_admin/rpm.rb
linux_admin-0.2.2 lib/linux_admin/rpm.rb
linux_admin-0.2.1 lib/linux_admin/rpm.rb
linux_admin-0.2.0 lib/linux_admin/rpm.rb