turbo-sprockets-rails3 0.3.12 → 0.3.13
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/turbo-sprockets/tasks/assets.rake +5 -0
- data/lib/turbo-sprockets/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea788f78400eee2f08e17f56d1f94ce91be13415
|
4
|
+
data.tar.gz: bd9c5efe875ec71be93599d8be2576a948d824d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9390b721baa65e7b9e9d830813c4534ed0bac1a3122d783336a7d1d98af82851ee7ebc746f2b17a5921623ce76406bdfe45aebd743ac0f20d11c38bc68f06cbc
|
7
|
+
data.tar.gz: 327b6f3dc54fb8bc0a40148504777225c2dc177ebaf307278df02a5ed9b30ed3c833b7f30c41f270f60be1caadf23695bd8200640261ca659393b1a31e13961a
|
data/README.md
CHANGED
@@ -33,7 +33,7 @@ Enjoy your lightning fast deploys!
|
|
33
33
|
|
34
34
|
## Removing Expired Assets
|
35
35
|
|
36
|
-
`turbo-sprockets-rails3` provides a Rake task called `assets:clean_expired`. You can run this task after `assets:precompile` to remove outdated assets.
|
36
|
+
`turbo-sprockets-rails3` provides a Rake task called `assets:clean_expired`. You can run this task after `assets:precompile` to remove outdated assets. To automatically run this `assets:clean_expired` task after `assets:precompile`, you can set the `CLEAN_EXPIRED_ASSETS` environment variable to `true` (`CLEAN_EXPIRED_ASSETS=true rake assets:precompile`).
|
37
37
|
|
38
38
|
If you use this rake task, you must set `config.assets.handle_expiration` to true in `config/environments/production.rb`. This makes sure that asset modification times
|
39
39
|
are updated properly before `assets:precompile`, so that the `clean_expired` task knows which assets are safe to remove.
|
@@ -202,3 +202,8 @@ task_enhancements.each do |task_name, actions|
|
|
202
202
|
Rake::Task[task_name].enhance &proc
|
203
203
|
end
|
204
204
|
end
|
205
|
+
|
206
|
+
# Clean expired assets after asset precompile, if CLEAN_EXPIRED_ASSETS is set
|
207
|
+
Rake::Task["assets:precompile:all"].enhance do
|
208
|
+
Rake::Task["assets:clean_expired:all"].invoke if ENV['CLEAN_EXPIRED_ASSETS'].in? %w(true yes 1)
|
209
|
+
end
|