module Bard::CLI::Ping
Public Class Methods
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
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