Class: LearnTest::Dependencies::NodeJS
- Inherits:
-
LearnTest::Dependency
- Object
- LearnTest::Dependency
- LearnTest::Dependencies::NodeJS
- Defined in:
- lib/learn_test/dependencies/nodejs.rb
Instance Attribute Summary
Attributes inherited from LearnTest::Dependency
Instance Method Summary collapse
Methods inherited from LearnTest::Dependency
#execute, #initialize, #mac?, #print_installing, #run_install, #win?
Constructor Details
This class inherits a constructor from LearnTest::Dependency
Instance Method Details
#install ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/learn_test/dependencies/nodejs.rb', line 8 def install if !mac? die('Please install NodeJS: https://nodejs.org/en/download') else puts('Checking for homebrew...'.green) die('You must have Homebrew installed') unless brew_installed? puts('Updating brew...'.green) print_installing('node') run_install('brew install node') end end |
#missing? ⇒ Boolean
4 5 6 |
# File 'lib/learn_test/dependencies/nodejs.rb', line 4 def missing? `which node`.empty? end |