socketry / cloudflare

An asynchronous Ruby wrapper for the CloudFlare V4 API.
MIT License
139 stars 88 forks source link

Feature: Add purge_cache API call for zone #31

Closed mkalygin closed 6 years ago

mkalygin commented 6 years ago

This PR adds support for purging cache for a particular zone. See Cloudflare documentation.

I've implemented this to fix https://github.com/leighmcculloch/middleman-cdn/issues/17 which apparently broke the middleman-cdn gem.

Not sure the rspec test is useful though. I have no idea how to test it. 🤔

leighmcculloch commented 6 years ago

👏

mkalygin commented 6 years ago

@ioquatix could you take a look at this feature? If this repo is not supported anymore, I think we'll need to do our own API call in https://github.com/leighmcculloch/middleman-cdn/issues/17.

ioquatix commented 6 years ago

It looks good.

leighmcculloch commented 6 years ago

@ioquatix Thank you for merging this. Would you be able to tag a new version with this functionality?

ioquatix commented 6 years ago

Released in v3.2.0 :) Thanks for your effort.

leighmcculloch commented 6 years ago

Woohoo thanks!