Class: Pull

Inherits:
CommandArray show all
Defined in:
lib/pull.rb

Instance Method Summary collapse

Methods inherited from CommandArray

#add, #execute

Instance Method Details

#updateObject



6
7
8
9
10
11
12
13
14
# File 'lib/pull.rb', line 6

def update
  if(Environment.scm=='git' && Environment.scm_origin.length > 0 && `git config --list`.include?('user.name='))
 if(Timer.elapsed_exceeds?("last_pull",60*60*2))
 #if(Timer.get_elapsed("last_pull").nil? || Timer.get_elapsed("last_pull") > 60*60*2)
   self.add "<%`git pull 2>&1`%>"
   self.add "<%Timer.set_timestamp('last_pull')%>"
 end
	end
end