Class: Bixby::Provision::NodeJS
- Defined in:
- lib/bixby/provision/dsl/nodejs.rb
Constant Summary collapse
- EXPORTS =
[]
- CURRENT_VERSION =
"0.10.26"
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#get_gid, #get_group, #get_uid, #get_user, #initialize, #tap, #tempfile
Methods included from Util::File
#chmod, #chown, #sha256sum, #which
Constructor Details
This class inherits a constructor from Bixby::Provision::Base
Instance Method Details
#install(opts = {}) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/bixby/provision/dsl/nodejs.rb', line 11 def install(opts={}) logger.info "nodejs.install" version = opts.delete(:version) || CURRENT_VERSION path = opts.delete(:path) || "/usr/local" if ubuntu? || opts[:tarball] then install_from_tarball(version, path) elsif amazon? or centos? then sys.package "nodejs" end end |