Sha256: 6864e8bb9f94328549e94680c85df3b41a8576a1aad40f386f5c0d8cf8e22b5c

Contents?: true

Size: 507 Bytes

Versions: 23

Compression:

Stored size: 507 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 && `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
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
dev_tasks-1.0.35 lib/pull.rb
dev_tasks-1.0.34 lib/pull.rb
dev_tasks-1.0.33 lib/pull.rb
dev_tasks-1.0.31 lib/pull.rb
dev_tasks-1.0.30 lib/pull.rb
dev_tasks-1.0.29 lib/pull.rb
dev_tasks-1.0.28 lib/pull.rb
dev_tasks-1.0.27 lib/pull.rb
dev_tasks-1.0.26 lib/pull.rb
dev_tasks-1.0.25 lib/pull.rb
dev_tasks-1.0.24 lib/pull.rb
dev_tasks-1.0.23 lib/pull.rb
dev_tasks-1.0.22 lib/pull.rb
dev_tasks-1.0.21 lib/pull.rb
dev_tasks-1.0.20 lib/pull.rb
dev_tasks-1.0.19 lib/pull.rb
dev_tasks-1.0.18 lib/pull.rb
dev_tasks-1.0.17 lib/pull.rb
dev_tasks-1.0.16 lib/pull.rb
dev_tasks-1.0.15 lib/pull.rb