Class: EY::Serverside::RailsAssets::Strategy::Cleaning

Inherits:
Shared
  • Object
show all
Defined in:
lib/engineyard-serverside/rails_assets/strategy.rb

Overview

Precompiled assets are shared across all deploys like Shared. Before compiling the active deploying assets, all assets that are not referenced by the manifest.yml from the previous deploy are removed. After cleaning, the new assets are compiled over the top. The result is an assets dir that contains the last assets and the current assets.

When no assets changes are detected, shared directory is only symlinked and cleaning and precompile tasks are not run.

Instance Attribute Summary

Attributes inherited from Shared

#paths, #runner

Instance Method Summary collapse

Methods inherited from Shared

#initialize, #reusable?, #reuse

Constructor Details

This class inherits a constructor from EY::Serverside::RailsAssets::Strategy::Shared

Instance Method Details

#prepareObject


125
126
127
128
129
130
131
132
133
# File 'lib/engineyard-serverside/rails_assets/strategy.rb', line 125

def prepare
  reuse
  remove_old_assets
  yield
rescue
  # how do you restore back to the old assets if some have been overwritten?
  # probably just deploy again I suppose.
  raise
end