Class: Shuttle::Nodejs

Inherits:
Strategy show all
Defined in:
lib/shuttle/deployment/nodejs.rb

Constant Summary

Constants included from Helpers

Helpers::LEVEL_COLORS

Instance Attribute Summary

Attributes inherited from Deploy

#config, #environment, #ssh, #target, #version

Instance Method Summary collapse

Methods inherited from Strategy

#changes_at?, #checkout_code, #cleanup_release, #cleanup_releases, #connect, #debug?, #deploy_running?, #disable_history, #execute_commands, #execute_hook, #export_environment, #keep_releases, #link_release, #release_lock, #rollback, #update_code, #update_code_svn, #write_lock, #write_release, #write_revision

Methods inherited from Deploy

#available_releases, #initialize, #last_version

Methods included from PathHelpers

#current_path, #deploy_path, #release_path, #scm_path, #shared_path, #version_path

Methods included from Helpers

#deployer_hostname, #error, #git_installed?, #git_remote, #log, #release_exists?, #stream_output, #svn_installed?, #warn

Constructor Details

This class inherits a constructor from Shuttle::Deploy

Instance Method Details

#deployObject



13
14
15
16
17
18
19
20
# File 'lib/shuttle/deployment/nodejs.rb', line 13

def deploy
  setup
  update_code
  checkout_code
  install_dependencies
  link_release
  cleanup_releases
end

#setupObject



3
4
5
6
7
8
9
10
11
# File 'lib/shuttle/deployment/nodejs.rb', line 3

def setup
  if node_installed?
    log "Using Node.js v#{node_version}, Npm v#{npm_version}"
  else
    error "Node.js is not installed."
  end

  super
end