# File lib/rhc-common.rb, line 742
  def self.check_app_available(net_http, app_name, fqdn, health_check_path, result, git_url, repo_dir, no_git)

    available = MAX_RETRIES.times.any? do |i|
      sleep i * DEFAULT_DELAY

      puts "Checking if the application is available ##{i+1}"
      if health_check_path and !health_check_path.empty?
        value = open("http://#{fqdn}/#{health_check_path}").read[0,1] rescue nil
        # TODO: I should be typed exception ApplicationHealthFailure
        raise "ERROR: The application was unable to start.  Please report this issue via the forums or IRC or file a bug through our public bug tracker." if value == '0'
        next true if value == '1'
      end
      open("http://#{fqdn}") rescue nil
    end

    if available
      puts "Application #{app_name} is available at: http://#{fqdn}/"
      puts "  Git URL: #{git_url}"

      if @mydebug
        unless no_git
          puts "To make changes to '#{app_name}', commit to #{repo_dir}/."
        else
          puts "To make changes to '\#{app_name}', you must first clone it with:\ngit clone \#{git_url}\n\n"
          puts "Then run 'git push' to update your OpenShift space."
        end
      end
      if result && !result.empty?
        puts "#{result}"
      end
      true
    else
      puts "Application is not available"
      false
    end
  rescue StandardError => e
    puts e
    false
  end