Module: Shuttle::PathHelpers

Included in:
Deploy
Defined in:
lib/shuttle/path_helpers.rb

Instance Method Summary collapse

Instance Method Details

#current_path(path = nil) ⇒ String

Get current release (symlinked) path

Returns:

  • (String)


23
24
25
# File 'lib/shuttle/path_helpers.rb', line 23

def current_path(path=nil)
  [deploy_path, 'current', path].compact.join('/')
end

#deploy_path(path = nil) ⇒ String

Get deployment root path, everything is based from here

Returns:

  • (String)


5
6
7
# File 'lib/shuttle/path_helpers.rb', line 5

def deploy_path(path=nil)
  [target.deploy_to, path].compact.join('/')
end

#release_path(path = nil) ⇒ String

Get path to currently used release

Returns:

  • (String)


17
18
19
# File 'lib/shuttle/path_helpers.rb', line 17

def release_path(path=nil)
  [deploy_path, 'releases', version, path].compact.join('/')
end

#scm_pathString

Get path to where repository code is stored

Returns:

  • (String)


35
36
37
# File 'lib/shuttle/path_helpers.rb', line 35

def scm_path
  deploy_path('scm')
end

#shared_path(path = nil) ⇒ String

Get shared path between releases

Returns:

  • (String)


11
12
13
# File 'lib/shuttle/path_helpers.rb', line 11

def shared_path(path=nil)
  [deploy_path, 'shared', path].compact.join('/')
end

#version_pathString

Get path to release version file

Returns:

  • (String)


29
30
31
# File 'lib/shuttle/path_helpers.rb', line 29

def version_path
  deploy_path('version')
end