Module: Bard::CLI::Ping
- Defined in:
- lib/bard/cli/ping.rb
Class Method Summary collapse
Class Method Details
.included(mod) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 |
# 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 |