class DPL::Provider::Cloud66

Public Instance Methods

check_auth() click to toggle source
# File lib/dpl/provider/cloud66.rb, line 19
def check_auth
end
needs_key?() click to toggle source
# File lib/dpl/provider/cloud66.rb, line 7
def needs_key?
  false
end
push_app() click to toggle source
# File lib/dpl/provider/cloud66.rb, line 11
def push_app
  uri = URI.parse(redeployment_hook)

  response = webhook_call(uri.scheme, uri.host, uri.port, uri.path)

  error("Redeployment failed [#{response.code}]") if response.code != '200'
end

Private Instance Methods

redeployment_hook() click to toggle source
# File lib/dpl/provider/cloud66.rb, line 33
def redeployment_hook
  option(:redeployment_hook)
end
webhook_call(scheme, host, port, path) click to toggle source
# File lib/dpl/provider/cloud66.rb, line 24
def webhook_call(scheme, host, port, path)
  http = Net::HTTP.new(host, port)
  http.use_ssl = (scheme.downcase == 'https')

  request = Net::HTTP::Post.new(path)

  return http.request(request)
end