Class: Pull
- Inherits:
-
Array
- Object
- Array
- Pull
- Defined in:
- lib/pull.rb
Overview
< CommandArray
Instance Method Summary collapse
Instance Method Details
#update ⇒ Object
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) add "<%`git pull 2>&1`%>" add "<%Timer.set_timestamp('last_pull')%>" end end end |