Sha256: 3de93aaebba271cee614f759669d390126d7880dd2466792df1fc4c3ac20bb5c

Contents?: true

Size: 947 Bytes

Versions: 24

Compression:

Stored size: 947 Bytes

Contents

module Shuttle
  module PathHelpers
    # Get deployment root path, everything is based from here
    # @return [String]
    def deploy_path(path=nil)
      [target.deploy_to, path].compact.join('/')
    end

    # Get shared path between releases
    # @return [String]
    def shared_path(path=nil)
      [deploy_path, 'shared', path].compact.join('/')
    end

    # Get path to currently used release
    # @return [String]
    def release_path(path=nil)
      [deploy_path, 'releases', version, path].compact.join('/')
    end

    # Get current release (symlinked) path
    # @return [String]
    def current_path(path=nil)
      [deploy_path, 'current', path].compact.join('/')
    end

    # Get path to release version file
    # @return [String]
    def version_path
      deploy_path('version')
    end

    # Get path to where repository code is stored
    # @return [String]
    def scm_path
      deploy_path('scm')
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
shuttle-deploy-0.2.0.beta5 lib/shuttle/path_helpers.rb
shuttle-deploy-0.2.0.beta4 lib/shuttle/path_helpers.rb
shuttle-deploy-0.2.0.beta3 lib/shuttle/path_helpers.rb
shuttle-deploy-0.2.0.beta2 lib/shuttle/path_helpers.rb