add new gclient_cache folder to cleanup

This commit is contained in:
Christian Moritz 2018-08-09 00:35:04 +02:00
parent 232de9d9da
commit 6302d622e3
2 changed files with 10 additions and 1 deletions

View File

@ -9,7 +9,7 @@ module CleanupRefinement
end end
def nested_cache? def nested_cache?
directory? && ["glide_home", "java_cache", "npm_cache"].include?(basename.to_s) directory? && %w[glide_home java_cache npm_cache gclient_cache].include?(basename.to_s)
end end
def prune?(days) def prune?(days)

View File

@ -197,6 +197,15 @@ describe Homebrew::Cleanup do
expect(npm_cache).not_to exist expect(npm_cache).not_to exist
end end
it "cleans up 'gclient_cache'" do
gclient_cache = (HOMEBREW_CACHE/"gclient_cache")
gclient_cache.mkpath
subject.cleanup_cache
expect(gclient_cache).not_to exist
end
it "cleans up all files and directories" do it "cleans up all files and directories" do
git = (HOMEBREW_CACHE/"gist--git") git = (HOMEBREW_CACHE/"gist--git")
gist = (HOMEBREW_CACHE/"gist") gist = (HOMEBREW_CACHE/"gist")