leighmcculloch / middleman-cdn Goto Github PK
View Code? Open in Web Editor NEWMiddleman extension automating invalidation of CloudFlare, MaxCDN, AWS CloudFront, Fastly and Rackspace CDN caches.
License: Other
Middleman extension automating invalidation of CloudFlare, MaxCDN, AWS CloudFront, Fastly and Rackspace CDN caches.
License: Other
Hi there!
Fantastic tool โ thanks so much for building this! The integration with middleman-s3_sync is very helpful.
Opening this issue because I saw that this gem depends on colorize, which is licensed under the GPL, not a permissive license like on this project. middleman-s3_sync had the same issue and switched to ansi. If that sounds cool to you, I'm happy to switch over this awesome tool.
Should probably parameterise config param name in error message.
As of #9, there's a invalidate_zone_for_many_files
option for Cloudflare that means "if I have more than 50 files to invalidate, I'll just invalidate the zone (to avoid hitting the API rate limit)." The option is supposed to default to true, but wouldn't work until I added it explicitly.
Failing deploy: https://travis-ci.org/ashfurrow/blog/builds/119957771#L7481
Succeeding deploy (with explicit option): https://travis-ci.org/ashfurrow/blog/builds/120216017#L5992
Please let me know if I can be off assistance debugging.
This commit 6ecd16d introduced a compatibility issue with CloudFlare gem. The gem's API has been changed and the correct connection call now looks like this (see the gem's docs):
connection = Cloudflare.connect(key: key, email: email)
The specs passed because the old Cloudflare::connection
method is mocked in rspec.
But in reality the middleman-cdn
gem is not working at all because of this issue.
Hey! I was noticing rate limit errors like this one happening a lot. The error only made sense if cloudflare was trying to invalidate everything, based on the error message. That's based on the all
parameter, and I took a look at where the method is called. It looks like all
is inferred from this method, which is true
if you're using the default filter.
From what I can tell, it looks like all
is being passed into the invalidate
function incorrectly set to true
if the filter applies to all files, but within the invalidate
function, it's inferred to mean "invalidate all files, not the ones I was given."
Let me know if this makes sense, and if I can provide any more details. I used this fix, and it appears to be working.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.