def update
      say "Fetching certificate chain from DNSimple for #{options['dnsimple_common_name']} ...", :green
      dnsimple_certificate.certificate_chain

      say "Fetching private key from DNSimple for #{options['dnsimple_common_name']}. ..", :green
      dnsimple_certificate.private_key

      say "Fetching certificates from Heroku app #{options['heroku_app']} ...", :green
      heroku_certificate.certificates

      if heroku_certificate.certificates.any?
        say "Updating existing certificate on Heroku app #{options['heroku_app']} ...", :green
        heroku_certificate.update
      else
        say "Adding new certificate on Heroku app #{options['heroku_app']} ...", :green
        heroku_certificate.create
      end

      say "Done!", :green
    rescue => e
      say "Error adding certificate ...", :red
      say "   Response: #{e}", :red

      abort
    end
def update
      say "Fetching certificate chain from DNSimple for #{options['dnsimple_common_name']} ...", :green
      dnsimple_certificate.certificate_chain

      say "Fetching private key from DNSimple for #{options['dnsimple_common_name']}. ..", :green
      dnsimple_certificate.private_key

      say "Fetching certificates from Heroku app #{options['heroku_app']} ...", :green
      heroku_certificate.certificates

      if heroku_certificate.certificates.any?
        say "Updating existing certificate on Heroku app #{options['heroku_app']} ...", :green
        heroku_certificate.update
      else
        say "Adding new certificate on Heroku app #{options['heroku_app']} ...", :green
        heroku_certificate.create
      end

      say "Done!", :green
    rescue => e
      say "Error adding certificate ...", :red
      say "   Response: #{e}", :red

      abort
    end
rubocop:disable Metrics/AbcSize
 rubocop:disable Metrics/MethodLength