Class: SiteFuel::External::GIT
- Inherits:
-
AbstractExternalProgram
- Object
- AbstractExternalProgram
- SiteFuel::External::GIT
- Defined in:
- lib/sitefuel/external/GIT.rb
Overview
defines a wrapper around the Git version control system this wrapper is designed to only handle
Constant Summary
Constants inherited from AbstractExternalProgram
AbstractExternalProgram::VERSION_SEPARATOR
Instance Attribute Summary
Attributes inherited from AbstractExternalProgram
Class Method Summary collapse
-
.compatible_versions ⇒ Object
this would probably work with.
- .program_name ⇒ Object
-
.shallow_clone(source, directory = nil, depth = 1) ⇒ Object
creates a shallow clone of an existing repository.
Methods inherited from AbstractExternalProgram
#add_option, allowed_option_name?, #apply_value, #build_command_line, call_option, capture_output, capture_stderr, compatible_version?, compatible_version_number?, create_tmp_directory, #ensure_option_validity, ensure_valid_option, excluded_option_names, #execute, execute, extract_program_version, #has_default?, #initialize, option, option?, option_default, #option_template, option_template, option_version, options, organize_options, output_handling, program_binary, program_found?, program_version, random_string, #requires_value?, #takes_value?, test_version_number, #valid_option?, verify_compatible_version, verify_program_exists, version_older?
Methods included from Logging
#debug, #error, #fatal, #info, #logger=, #warn
Constructor Details
This class inherits a constructor from SiteFuel::External::AbstractExternalProgram
Class Method Details
.compatible_versions ⇒ Object
this would probably work with
24 25 26 |
# File 'lib/sitefuel/external/GIT.rb', line 24 def self.compatible_versions '> 1.4' end |
.program_name ⇒ Object
19 20 21 |
# File 'lib/sitefuel/external/GIT.rb', line 19 def self.program_name 'git' end |
.shallow_clone(source, directory = nil, depth = 1) ⇒ Object
creates a shallow clone of an existing repository
41 42 43 44 45 46 47 48 49 50 51 52 |
# File 'lib/sitefuel/external/GIT.rb', line 41 def self.shallow_clone(source, directory = nil, depth=1) if directory == nil directory = create_tmp_directory('git') end execute :clone, :depth, depth, :source, source, :output, directory directory end |