ndbroadbent / turbo-sprockets-rails3

Speeds up your Rails 3 assets:precompile by only recompiling changed files, and only compiling once to generate all assets
MIT License
976 stars 78 forks source link

Expired assets and Capistrano #94

Closed lesliev-figured closed 10 years ago

lesliev-figured commented 10 years ago

Hi Nathan

Turbo Sprockets brought our asset compile from >10 minutes down to 1.5 - thanks for the great work on this Gem!

I've not done the steps in "removing expired assets" (https://github.com/ndbroadbent/turbo-sprockets-rails3#removing-expired-assets) because I assume Capistrano is doing that. Am I wrong?

I see this at the end of the log:

 ** Removing assets that haven't been deployed for 10080 minutes...
  * executing "cd -- /home/deploy/apps/x/ && LC_COLLATE=C sort REQUIRED_ASSETS -o REQUIRED_ASSETS && cd -- /home/deploy/apps/x/shared/assets/ && for f in $( find * -mmin +10080 -type f | LC_COLLATE=C sort | LC_COLLATE=C comm -23 -- - /home/deploy/apps/x/REQUIRED_ASSETS ); do echo \"Removing unneeded asset: $f\"; rm -f -- \"$f\"; done; rm -f -- /home/deploy/apps/x/REQUIRED_ASSETS"

I also see this before the compile:

 ** Updating mtimes for ~784 assets...

Would that affect turbo sprockets?

ndbroadbent commented 10 years ago

Hi @lesliev-figured, you're right, I actually had a pull request make it into capistrano that handles asset expiry, and works with the turbo-sprockets-rails3 gem, so you should be all set. Let me know if you have any problems!