Class: AvoDeploy::ScmProvider::ScmProvider

Inherits:
Object
  • Object
show all
Defined in:
lib/avodeploy/scm_provider/scm_provider.rb

Overview

scm provider base class

Direct Known Subclasses

BzrScmProvider, GitScmProvider

Instance Method Summary collapse

Constructor Details

#initialize(env) ⇒ ScmProvider

Initializes the scm provider

Parameters:

  • env (TaskExecutionEnvironment)

    env for the commands to be executed in

Raises:

  • (ArgumentError)


27
28
29
30
31
# File 'lib/avodeploy/scm_provider/scm_provider.rb', line 27

def initialize(env)
  raise ArgumentError, 'env must be a TaskExecutionEnvironment' unless env.is_a?(AvoDeploy::Task::TaskExecutionEnvironment)

  @env = env
end

Instance Method Details

#checkout_from_remote(url, local_dir, branch, tag = nil) ⇒ Object

Checks out repository code from a system and switches to the given branch

Parameters:

  • url (String)

    the repository location

  • local_dir (String)

    path to the working copy

  • branch (String)

    the branch to check out

  • tag (String) (defaults to: nil)

    tag to check out

Raises:

  • (NotImplementedError)


39
40
41
# File 'lib/avodeploy/scm_provider/scm_provider.rb', line 39

def checkout_from_remote(url, local_dir, branch, tag = nil)
  raise NotImplementedError
end

#cli_utilsArray

Returns scm files to be executed in the deployment process

Returns:

  • (Array)

    array of scm control files

Raises:

  • (NotImplementedError)


72
73
74
# File 'lib/avodeploy/scm_provider/scm_provider.rb', line 72

def cli_utils
  raise NotImplementedError
end

#diff_files_between_revisions(rev1, rev2) ⇒ Array

Finds files that differ between two revisions and returns them as a array

Parameters:

Returns:

  • (Array)

Raises:

  • (NotImplementedError)


50
51
52
# File 'lib/avodeploy/scm_provider/scm_provider.rb', line 50

def diff_files_between_revisions(rev1, rev2)
  raise NotImplementedError
end

#revisionArray

Returns the scm tools that have to be installed on specific systems

Returns:

  • (Array)

    array of utilities

Raises:

  • (NotImplementedError)


79
80
81
# File 'lib/avodeploy/scm_provider/scm_provider.rb', line 79

def revision
  raise NotImplementedError
end

#scm_filesString

Returns the current revision of the working copy

Returns:

  • (String)

    the current revision of the working copy

Raises:

  • (NotImplementedError)


65
66
67
# File 'lib/avodeploy/scm_provider/scm_provider.rb', line 65

def scm_files
  raise NotImplementedError
end

#unknown_files_in_workdirArray

Finds files unknown file in the working directory and returns them as a array

Returns:

  • (Array)

Raises:

  • (NotImplementedError)


58
59
60
# File 'lib/avodeploy/scm_provider/scm_provider.rb', line 58

def unknown_files_in_workdir
  raise NotImplementedError
end