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

Version Path
dev_tasks-1.0.11 lib/pull.rb
dev_tasks-1.0.10 lib/pull.rb
dev_tasks-1.0.9 lib/pull.rb
dev_tasks-1.0.8 lib/pull.rb
dev_tasks-1.0.7 lib/pull.rb
dev_tasks-1.0.6 lib/pull.rb
dev_tasks-1.0.5 lib/pull.rb
dev_tasks-1.0.4 lib/pull.rb
dev_tasks-1.0.3 lib/pull.rb
dev_tasks-1.0.2 lib/pull.rb
dev_tasks-1.0.1 lib/pull.rb
dev_tasks-0.0.167 lib/pull.rb
dev_tasks-1.0.0 lib/pull.rb
dev_tasks-0.0.166 lib/pull.rb
dev_tasks-0.0.164 lib/pull.rb
dev_tasks-0.0.163 lib/pull.rb
dev_tasks-0.0.162 lib/pull.rb
dev_tasks-0.0.161 lib/pull.rb
dev_tasks-0.0.160 lib/pull.rb
dev_tasks-0.0.159 lib/pull.rb