Class: Avocado::ScmProvider
- Inherits:
-
Object
- Object
- Avocado::ScmProvider
- Defined in:
- lib/avocado/scm_provider/scm_provider.rb
Overview
scm provider facade
Instance Method Summary collapse
-
#checkout_from_remote(url, local_dir, branch) ⇒ Object
Checks out repository code from a system and switches to the given branch.
-
#cli_utils ⇒ Array
Returns scm files to be executed in the deployment process.
-
#initialize(env, scm) ⇒ ScmProvider
constructor
Initializes the scm provider.
-
#revision ⇒ Array
Returns the scm tools that have to be installed on specific systems.
-
#scm_files ⇒ String
Returns the current revision of the working copy.
Constructor Details
#initialize(env, scm) ⇒ ScmProvider
Initializes the scm provider
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/avocado/scm_provider/scm_provider.rb', line 27 def initialize(env, scm) raise ArgumentError, 'env must be a TaskExecutionEnvironment' unless env.is_a?(TaskExecutionEnvironment) @env = env @real_provider = nil if scm == :git @real_provider = GitScmProvider.new(env) end end |
Instance Method Details
#checkout_from_remote(url, local_dir, branch) ⇒ Object
Checks out repository code from a system and switches to the given branch
43 44 45 |
# File 'lib/avocado/scm_provider/scm_provider.rb', line 43 def checkout_from_remote(url, local_dir, branch) @real_provider.checkout_from_remote(url, local_dir, branch) end |
#cli_utils ⇒ Array
Returns scm files to be executed in the deployment process
57 58 59 |
# File 'lib/avocado/scm_provider/scm_provider.rb', line 57 def cli_utils @real_provider.cli_utils end |
#revision ⇒ Array
Returns the scm tools that have to be installed on specific systems
64 65 66 |
# File 'lib/avocado/scm_provider/scm_provider.rb', line 64 def revision @real_provider.revision end |
#scm_files ⇒ String
Returns the current revision of the working copy
50 51 52 |
# File 'lib/avocado/scm_provider/scm_provider.rb', line 50 def scm_files @real_provider.scm_files end |