Class: Drydock::Plugins::APK

Inherits:
PackageManager show all
Defined in:
lib/drydock/plugins/apk.rb

Instance Attribute Summary

Attributes inherited from Base

#project

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Drydock::Plugins::Base

Instance Method Details

#add(*pkgs) ⇒ Object



8
9
10
11
# File 'lib/drydock/plugins/apk.rb', line 8

def add(*pkgs)
  opts = pkgs.last.is_a?(Hash) ? pkgs.pop : {}
  project.run "apk add #{pkgs.join(' ')}", opts
end

#cleanObject



13
14
15
# File 'lib/drydock/plugins/apk.rb', line 13

def clean
  project.run "rm -rf /var/cache/apk/*"
end

#remove(*pkgs) ⇒ Object



17
18
19
# File 'lib/drydock/plugins/apk.rb', line 17

def remove(*pkgs)
  project.run "apk del #{pkgs.join(' ')}"
end

#updateObject



21
22
23
# File 'lib/drydock/plugins/apk.rb', line 21

def update
  project.run "apk update"
end

#upgradeObject



25
26
27
# File 'lib/drydock/plugins/apk.rb', line 25

def upgrade
  project.run "apk upgrade"
end