riboseinc / digicert

Ruby bindings for the Digicert Services API
https://www.digicert.com/services/v2/documentation
MIT License
8 stars 10 forks source link

Add `#download_to_path` to certificate #69

Closed abunashir closed 7 years ago

abunashir commented 7 years ago

This commit adds the download_to_path for certificate instance, so now we can download an existing certificate to a specific path using the certificate instance. This also changes on some existing downloader interface so now the fetch_to_path supports additional hash key to specify platform or format.

certificate = Digicert::Certificate.find(certificate_id)
certificate.download_to_path(
  platform: "apache",
  path: File.expand_path("./tmp"),
  ext: "zip",
)
ronaldtse commented 7 years ago

Nice and clean. I like it!