Module: Shuttle::PathHelpers
- Included in:
- Deploy
- Defined in:
- lib/shuttle/path_helpers.rb
Instance Method Summary collapse
-
#current_path(path = nil) ⇒ String
Get current release (symlinked) path.
-
#deploy_path(path = nil) ⇒ String
Get deployment root path, everything is based from here.
-
#release_path(path = nil) ⇒ String
Get path to currently used release.
-
#scm_path ⇒ String
Get path to where repository code is stored.
-
#shared_path(path = nil) ⇒ String
Get shared path between releases.
-
#version_path ⇒ String
Get path to release version file.
Instance Method Details
#current_path(path = nil) ⇒ String
Get current release (symlinked) path
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
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
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_path ⇒ String
Get path to where repository code is stored
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
11 12 13 |
# File 'lib/shuttle/path_helpers.rb', line 11 def shared_path(path=nil) [deploy_path, 'shared', path].compact.join('/') end |
#version_path ⇒ String
Get path to release version file
29 30 31 |
# File 'lib/shuttle/path_helpers.rb', line 29 def version_path deploy_path('version') end |