lib/braid/rspec_git.rb in dreamcat4-braid-0.53 vs lib/braid/rspec_git.rb in dreamcat4-braid-0.531
- old
+ new
@@ -7,21 +7,26 @@
@name = name
@path = path
@url = url
end
+ def msg(str)
+ puts "RSpec: #{str}"
+ end
+
def plugins_fetched?
submodules.all? {|s| File.directory?(s[:path]) }
end
def update(target)
check_for_clean_repos "Unable to update"
repos.each do |r|
if File.exist?(r[:path])
msg "** Updating #{r[:name]}"
- # target = ENV['REMOTE'] ? "#{ENV['REMOTE']} master" : ""
- unless system("cd #{r[:path]} && git pull --rebase #{target}")
+ target = target ? target : "master"
+ # unless system("cd #{r[:path]} && git pull --rebase #{target}")
+ unless system("cd #{r[:path]} && git pull --rebase #{r[:url]} #{target}")
msg "Error updating #{r[:name]}"
exit 1
end
else
msg "** Fetching #{r[:name]}"