Sha256: 1cc6817bafd26d593bc6c2f28ef3896c1dc12ccab55347d7a9ab17931231c27f
Contents?: true
Size: 461 Bytes
Versions: 23
Compression:
Stored size: 461 Bytes
Contents
require_relative('./commandarray.rb') require_relative('./environment.rb') require 'time' class Pull < CommandArray def update if(Environment.scm=='git' && Environment.scm_origin.length > 0) 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 end
Version data entries
23 entries across 23 versions & 1 rubygems