turbo-sprockets-rails3 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +4 -3
- data/lib/turbo-sprockets/tasks/assets.rake +2 -1
- data/lib/turbo-sprockets/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -33,9 +33,10 @@ Go on, run `rake assets:precompile` again, and it should be a whole lot faster t
|
|
33
33
|
|
34
34
|
Enjoy your lightning fast deploys!
|
35
35
|
|
36
|
-
|
36
|
+
<!--#### Automatic clean up of old assets
|
37
37
|
|
38
38
|
By default, the `assets:precompile` task now deletes out-of-date assets after a new version is compiled. If you don't want to automatically delete old assets, you can turn off this behaviour by setting `config.assets.clean_after_precompile = false` in `config/environments/production.rb`.
|
39
|
+
-->
|
39
40
|
|
40
41
|
## Deployments
|
41
42
|
|
@@ -45,10 +46,10 @@ You won't be able to do an 'incremental update' on heroku, since your `public/as
|
|
45
46
|
folder will be empty at the start of each push. However, this gem can still cut your
|
46
47
|
precompile time in half, since it only compiles assets once to generate both digest and non-digest assets.
|
47
48
|
|
48
|
-
|
49
|
+
<!--### Capistrano
|
49
50
|
|
50
51
|
If you are deploying with Capistrano, it's not a good idea to symlink `public/assets` to a shared assets folder, because the asset cleanup task would delete the current assets before the deploy has finished. Keeping a separate copy of `public/assets` for each release also means that you can safely roll back to a previous release.
|
51
|
-
The best approach would be to add a deploy step that copies the `public/assets` folder from your previous release into the current release, before running `assets:precompile
|
52
|
+
The best approach would be to add a deploy step that copies the `public/assets` folder from your previous release into the current release, before running `assets:precompile`.-->
|
52
53
|
|
53
54
|
## Debugging
|
54
55
|
|
@@ -50,6 +50,7 @@ namespace :assets do
|
|
50
50
|
|
51
51
|
config = Rails.application.config
|
52
52
|
config.assets.compile = true
|
53
|
+
config.assets.clean_after_precompile = false if config.assets.clean_after_precompile.nil?
|
53
54
|
config.assets.digest = digest unless digest.nil?
|
54
55
|
config.assets.digest_files ||= {}
|
55
56
|
config.assets.source_digests ||= {}
|
@@ -78,7 +79,7 @@ namespace :assets do
|
|
78
79
|
compiler.compile
|
79
80
|
end
|
80
81
|
|
81
|
-
|
82
|
+
if config.assets.clean_after_precompile
|
82
83
|
cleaner = Sprockets::StaticCleaner.new(env, target, config.assets.digest_files)
|
83
84
|
cleaner.remove_old_assets!
|
84
85
|
end
|