Class: Rugular::Dependencies

Inherits:
Thor::Group
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/rugular/tasks/dependencies.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.exit_on_failue?Boolean

Returns:

  • (Boolean)


9
# File 'lib/rugular/tasks/dependencies.rb', line 9

def self.exit_on_failue?; true end

Instance Method Details

#bowerObject



25
26
27
28
29
30
31
32
# File 'lib/rugular/tasks/dependencies.rb', line 25

def bower
  puts <<-BOWER_MESSAGE
  ~~~~~~~~*\o/~~~~~/\*~~~~~~~
  Installing bower components
  BOWER_MESSAGE
  system('npm install -g bower')
  system('bower install')
end

#bundleObject



17
18
19
20
21
22
23
# File 'lib/rugular/tasks/dependencies.rb', line 17

def bundle
  puts <<-GEM_MESSAGE
   ~~~~~~~~*\o/~~~~~/\*~~~~~~~
      Installing Ruby gems
  GEM_MESSAGE
  system('bundle install')
end

#check_for_rugular_directoryObject



10
11
12
13
14
15
# File 'lib/rugular/tasks/dependencies.rb', line 10

def check_for_rugular_directory
  ::Rugular::AppChecker.check_for_rugular_directory(
    task_name: self.class.name,
    root_directory: destination_root
  )
end

#install_protractorObject

Protractor needs to be installed globally



43
44
45
# File 'lib/rugular/tasks/dependencies.rb', line 43

def install_protractor
  `npm install -g protractor coffee-script jasmine`
end

#npm_installObject



34
35
36
37
38
39
40
# File 'lib/rugular/tasks/dependencies.rb', line 34

def npm_install
  puts <<-NODE_MESSAGE
  ~~~~~~~~*\o/~~~~~/\*~~~~~~~
  Installing node packages
  NODE_MESSAGE
  system('npm install')
end