lib/assert_valid_asset.rb
# Determine if we have Internet access.  Note that this check depends on Ping standard library,
# which does not use the proper ICMP echo service (which is a privileged operation) but rather a TCP
# open of port 7 (echo).
Determine if we have Internet access.  Note that this check depends on Ping standard library,
which does not use the proper ICMP echo service (which is a privileged operation) but rather a TCP
open of port 7 (echo).
Determine if we have Internet access . Note that this check depends on Ping standard library which does not use the proper ICMP echo service ( which is a privileged operation ) but rather a TCP open of port 7 ( echo ) .
def internet_accessible?
    return @service_availability unless @service_availability.nil?
    @service_availability = Ping.pingecho(MARKUP_VALIDATOR_HOST, 5).tap do |available|
      $stderr << "#{MARKUP_VALIDATOR_HOST} not available.\n" unless available
    end
  end
def internet_accessible? return @service_availability unless @service_availability . nil? @service_availability = Ping . pingecho ( MARKUP_VALIDATOR_HOST , 5 ) . tap do | available | $stderr << "#{MARKUP_VALIDATOR_HOST} not available.\n" unless available end end
Determine if we have Internet access.
Determine if we have Internet access .