module Bard::CLI::Ping
Public Class Methods
included(mod)
click to toggle source
# File lib/bard/cli/ping.rb, line 4 def self.included mod mod.class_eval do desc "ping [server=production]", "hits the server over http to verify that its up." def ping server=:production server = config[server] down_urls = Bard::Ping.call(config[server]) down_urls.each { |url| puts "#{url} is down!" } exit 1 if down_urls.any? end end end
Public Instance Methods
ping(server=:production)
click to toggle source
# File lib/bard/cli/ping.rb, line 8 def ping server=:production server = config[server] down_urls = Bard::Ping.call(config[server]) down_urls.each { |url| puts "#{url} is down!" } exit 1 if down_urls.any? end