turbo-sprockets-rails3 0.3.12 → 0.3.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c919c4bbf41ec7d7756df849d74a3b67cb82817c
4
- data.tar.gz: f9f82c2dbf9460304c7521d30194f08011cf816e
3
+ metadata.gz: ea788f78400eee2f08e17f56d1f94ce91be13415
4
+ data.tar.gz: bd9c5efe875ec71be93599d8be2576a948d824d6
5
5
  SHA512:
6
- metadata.gz: d4f60f570fc31150eea73ffc3f58220d2190e7dd09fc18287a4363310be67eea5018cf348197c3c973ea881870b5f175f35936e111f294260ac69e95c8729177
7
- data.tar.gz: 21fa24ceaf22f45c2491e6ae9a0640bd29c453e87afe6e2923a8972ac9aa27c85ddf2c105d19bcd36debebf12dbcb006a23222f7e9b5f161e926080825bea00a
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
@@ -1,3 +1,3 @@
1
1
  module TurboSprockets
2
- VERSION = "0.3.12"
2
+ VERSION = "0.3.13"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbo-sprockets-rails3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12
4
+ version: 0.3.13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Broadbent