class GitUpdateStrategy
Public Class Methods
new(name)
click to toggle source
# File lib/lace/download_strategy.rb, line 110 def initialize name @target_folder = Lace.pkgs_folder/name end
Public Instance Methods
update()
click to toggle source
# File lib/lace/download_strategy.rb, line 114 def update if repo_valid? puts "Updating #@target_folder" @target_folder.cd do update_repo reset update_submodules if submodules? end else puts "Removing invalid .git repo" FileUtils.rm_rf @target_folder clone_repo end end