Sha256: 6416e033dbe2fa11bfa4c8f4d35387554ce24507854acd7c3c9a69745d315b1d
Contents?: true
Size: 858 Bytes
Versions: 9
Compression:
Stored size: 858 Bytes
Contents
# frozen_string_literal: true module Dpl module Providers class Cloud66 < Provider register :cloud66 status :alpha description sq(<<-STR) tbd STR env :cloud66 opt '--redeployment_hook URL', 'The redeployment hook URL', required: true, secret: true msgs failed: 'Redeployment failed (%s)' def deploy response = client.request(request) error :failed, response.code if response.code != '200' end private def client Net::HTTP.new(uri.host, uri.port).tap do |client| client.use_ssl = use_ssl? end end def request Net::HTTP::Post.new(uri.path) end def uri @uri ||= URI.parse(redeployment_hook) end def use_ssl? uri.scheme.downcase == 'https' end end end end
Version data entries
9 entries across 9 versions & 2 rubygems