non-stupid-digest-assets icon indicating copy to clipboard operation
non-stupid-digest-assets copied to clipboard

Non-digest only mode (move instead of copy)

Open abrom opened this issue 8 years ago • 4 comments

For various reasons we've gone for a setup where cache busting is provided at a higher level (root of the path) so digesting of any sort isn't useful (actually just gets in the way). Using this gem solves the problem but leaves our asset bundle double the size it really needs to be.

I'm going to patch a fork to include a non_digest_asset_mode or similar setting. Default being copy but optionally move.

Would this be something you'd be interested in?

abrom avatar Dec 07 '16 02:12 abrom

I'm just a non-stupid-digest-assets user, but I imagine moving the digested assets completely would break most applications. Perhaps adding a mode for copy, move, or symlink would be useful? I forget the disadvantages of symlink over copy in this situation but if I recall there are some other than the obvious bonus of not duplicating files.

courtland avatar Dec 07 '16 19:12 courtland

@courtland the proposed change would definitely keep the status quo by default (see my note about the default being copy). You'd need to opt-in to change that to move (or something else).

Here's what I'm proposing https://github.com/alexspeller/non-stupid-digest-assets/compare/master...abrom:master

along with

NonStupidDigestAssets.destupidify_mode = :move

will move instead of copy.

abrom avatar Dec 07 '16 22:12 abrom

A PR for this sounds good to me, I wouldn't use it personally but I can see it might be useful

alexspeller avatar Dec 18 '16 23:12 alexspeller

I think you can just set config.assets.digest = false if you don't want digests at all.

mvz avatar Jun 12 '18 05:06 mvz