Class: Bixby::Provision::System
- Defined in:
- lib/bixby/provision/dsl/system.rb
Constant Summary collapse
- EXPORTS =
[:refresh_packages, :upgrade_system, :package, :repo]
Constants inherited from Base
Instance Attribute Summary collapse
-
#packager ⇒ Object
readonly
Returns the value of attribute packager.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(*args) ⇒ System
constructor
A new instance of System.
- #package(*packages) ⇒ Object (also: #packages)
- #refresh_packages ⇒ Object
- #repo(name, opts = {}) ⇒ Object
- #upgrade_system ⇒ Object
Methods inherited from Base
#get_gid, #get_group, #get_uid, #get_user, #tap, #tempfile
Methods included from Util::File
#chmod, #chown, #sha256sum, #which
Constructor Details
Instance Attribute Details
#packager ⇒ Object (readonly)
Returns the value of attribute packager.
14 15 16 |
# File 'lib/bixby/provision/dsl/system.rb', line 14 def packager @packager end |
Instance Method Details
#package(*packages) ⇒ Object Also known as: packages
35 36 37 38 39 |
# File 'lib/bixby/provision/dsl/system.rb', line 35 def package(*packages) packages.flatten! logger.info "[sys] installing packages: " + packages.join(" ") packager.install(*packages) end |
#refresh_packages ⇒ Object
25 26 27 28 |
# File 'lib/bixby/provision/dsl/system.rb', line 25 def refresh_packages logger.info "[sys] refresh_packages" packager.refresh end |
#repo(name, opts = {}) ⇒ Object
42 43 44 45 46 |
# File 'lib/bixby/provision/dsl/system.rb', line 42 def repo(name, opts={}) if packager.install_repo(name, opts) then refresh_packages end end |
#upgrade_system ⇒ Object
30 31 32 33 |
# File 'lib/bixby/provision/dsl/system.rb', line 30 def upgrade_system logger.info "[sys] upgrade_system" packager.upgrade_system end |