andrusha / middleman-cloudfront

An Amazon CloudFront extension for middleman which allows you to invalidate CloudFront CDN cache
MIT License
58 stars 29 forks source link

Add root path invalidation if build/index.html is present #8

Closed samlevy closed 10 years ago

samlevy commented 10 years ago

I found that the gem doesn't invalidate the root URL on CloudFront. For example, http://example.com/index.html would be invalidated but http://example.com would not.

So I updated the #list_files method to add the root path to the list of files to invalidate if the build/index.html file is present.

manuelmeurer commented 10 years ago

Thanks for your bug report, Sam! I implemented this a bit differently by fixing the regex that looks for index.html files: https://github.com/andrusha/middleman-cloudfront/commit/c75ceb69bbdb57f8048278fd7d0d6364e0fa5996

manuelmeurer commented 10 years ago

Please use the Github version for now, until a new gem is released. (I can't release it on Rubygems)

samlevy commented 10 years ago

That did the trick and looks much cleaner. Thanks

andrusha commented 10 years ago

@samlevy @manuelmeurer thanks for taking care of it! I really appreciate it.