Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: heroku/heroku-buildpack-ruby
base: master
...
head fork: ndbroadbent/heroku-buildpack-turbo-sprockets
Checking mergeability… Don't worry, you can still create the pull request.
  • 16 commits
  • 1 file changed
  • 0 commit comments
  • 6 contributors
Showing with 22 additions and 0 deletions.
  1. +22 −0 lib/language_pack/rails3.rb
View
22 lib/language_pack/rails3.rb
@@ -69,11 +69,33 @@ def run_assets_precompile_rake_task
topic("Preparing app for Rails asset pipeline")
+ puts "Loading assets from saved cache"
+
+ FileUtils.mkdir_p('public')
+ cache.load "public/assets"
+
precompile.invoke(env: rake_env)
if precompile.success?
log "assets_precompile", :status => "success"
puts "Asset precompilation completed (#{"%.2f" % precompile.time}s)"
+
+ # If 'turbo-sprockets-rails3' gem is available, run 'assets:clean_expired' and
+ # cache assets if task was successful.
+ if bundler.has_gem?('turbo-sprockets-rails3')
+ log("assets_clean_expired") do
+ ( clean_expired_assets = rake.task("assets:clean_expired") ).invoke
+ if clean_expired_assets.success?
+ log "assets_clean_expired", :status => "success"
+ cache.store "public/assets"
+ else
+ log "assets_clean_expired", :status => "failure"
+ cache.clear "public/assets"
+ end
+ end
+ else
+ cache.clear "public/assets"
+ end
else
precompile_fail(precompile.output)
end

No commit comments for this range

Something went wrong with that request. Please try again.