Method: Git#initialize
- Defined in:
- lib/version_control/git.rb
#initialize(git, options, compat_options = {}) ⇒ Git
Initializes an instance of the class
Attributes
-
git- path to the git executable -
options- hash of options includes: url - url for svn repository base_path - path for the local repository username - repository user username password - repository user password verbose - true for verbose output repository - name of remote git repository (default = origin) artifact_path - path in repository for artifacts (default = .) branch - scm branch (default = master) simulate - simulate command - echo it (default = false) output_file - file for logging results (default = step output file)
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/version_control/git.rb', line 23 def initialize(git, , = {}) self.extend Utilities if .has_key?("SS_output_dir") BrpmAuto.log "Load for this class has changed, no longer necessary to send params as 2nd argument" = end @url = get_option(,"url") @base_path = get_option(,"base_path") user = get_option(,"username") password = get_option(,"password") @verbose = get_option(,"verbose", false) @artifact_path = get_option(,"artifact_path") @simulate = get_option(,"simulate", false) update_repo_info() if user != "" && password != "" @credential = " --username #{user} --password #{password}" else @credential = "" end super(params) @git = git end |