class GitRepo
Clone, Update and Delete Git Repos REQUIRES: git
Public Instance Methods
down()
click to toggle source
Delete the Repos
# File lib/exogenesis/passengers/git_repo.rb, line 23 def down each_repo_and_target do |_, target| rm_rf(target) end end
up()
click to toggle source
Clone the Repo if it doesn’t exist Pull the Repo if it does
# File lib/exogenesis/passengers/git_repo.rb, line 12 def up each_repo_and_target do |git_repo, target| if target.exist? pull_repo(git_repo, target) else clone_repo(git_repo, target) end end end
Private Instance Methods
each_repo_and_target() { |git_repo, get_path_for(raw_target)| ... }
click to toggle source
# File lib/exogenesis/passengers/git_repo.rb, line 31 def each_repo_and_target repos.each_pair do |git_repo, raw_target| yield git_repo, get_path_for(raw_target) end end