Class: Bard::Provision::HTTP

Inherits:
Bard::Provision show all
Defined in:
lib/bard/provision/http.rb

Overview

test for existence

Instance Attribute Summary

Attributes inherited from Bard::Provision

#config, #ssh_url

Instance Method Summary collapse

Methods inherited from Bard::Provision

call

Instance Method Details

#callObject



6
7
8
9
10
11
12
13
14
# File 'lib/bard/provision/http.rb', line 6

def call
  print "HTTP:"
  target_host = URI.parse(server.ping.first).host
  if system "curl -s --resolve #{target_host}:80:#{provision_server.ssh_uri.host} http://#{target_host} -I | grep -i \"x-powered-by: phusion passenger\" >/dev/null 2>&1"
    puts ""
  else
    puts " !!! not serving a rails app from #{provision_server.ssh_uri.host}"
  end
end