class Egads::Check

Public Instance Methods

check() click to toggle source
# File lib/egads/command/check.rb, line 10
def check
  say_status :rev, "#{rev} parsed to #{sha}"

  wait_for_build if options[:wait]

  if tarball.exists?
    say_status :exists, "Tarball for #{sha} exists"
    exit 0
  else
    say_status :missing, "Tarball for #{sha} does not exist", :red
    exit 1
  end
end

Protected Instance Methods

wait_for_build() click to toggle source
# File lib/egads/command/check.rb, line 25
def wait_for_build
  say_status :wait, "Waiting for tarball to exist...", :yellow
  loop do
    start = Time.now
    break if tarball.exists?
    printf '.'
    sleep [1 - (Time.now - start), 0].max
  end
  printf "\n"
end