Whenever rake assets:clean is run, the assets in public/assets with .digest in their name are not cleaned at all. This causes assets to accumulate on production and drastic increase in disk usage over time.
I realised that this is because of the following:
|
def extract_path_and_digest(digested_path) |
|
digest = digested_path.to_s[/-([0-9a-f]{7,128})\.(?!digested)[^.]+\z/, 1] |
|
path = digest ? digested_path.sub("-#{digest}", "") : digested_path |
|
|
|
[path, digest] |
|
end |
The regex ignores all files that have a . digest in them.
Is this on purpose? or is this a bug?