Sha256: 1af6a01603cf50da4a3446533227902a480dda6b736a9c3ab693a7d08f826894
Contents?: true
Size: 672 Bytes
Versions: 1
Compression:
Stored size: 672 Bytes
Contents
#!/usr/bin/env ruby require "netchk" require 'netchk/ip_verifier' require 'netchk/dns_server_verifier' require 'netchk/dns_resolv_verifier' require 'netchk/icmp_ping_verifier' require 'yaml' config_files = %w[.netchk.yaml .netchk.yml].map { |f| File.join(Dir.home, f) } config_file = config_files.find(&File.method(:exists?)) config = config_file &.then(&File.method(:read)) &.then(&YAML.method(:load)) config = config || {} Netchk::IpVerifier.new.verify Netchk::DNSServerVerifier.new(**(config['dns'] || {})).verify Netchk::DNSResolvVerifier.new(**(config['resolv'] || {})).verify Netchk::ICMPPingVerifier.new(**(config['icmp'] || {})).verify
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
netchk-0.0.1 | bin/netchk |