Sha256: c8dd616a79293cd9a40c1d0e25feb595dc63deb420df35efd099029de8951894

Contents?: true

Size: 779 Bytes

Versions: 1

Compression:

Stored size: 779 Bytes

Contents

UPM::Tool.new "yum" do

  os "centos", "fedora", "rhel"

  command "install", "yum install",  root: true
  command "remove",  "yum remove",   root: true
  command "update",  "yum update",   root: true
  command "upgrade", "yum upgrade",  root: true
  command "clean",   "yum clean",    root: true

  command "files",   "rpm -ql",  paged: true
  command "search" do |args|
    query = args.join(".+")
    run "yum", "search", *args, sort: true, paged: true, highlight: query
  end

  command "list" do |args|
    if args.any?
      highlight_query = args.join(".+")
      grep_query = /#{highlight_query}/
      run "yum", "list", "installed", grep: grep_query, highlight: highlight_query, paged: true
    else
      run "yum", "list", "installed", paged: true
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
upm-0.1.15 lib/upm/tools/yum.rb