do clean the assets

This commit is contained in:
Dmytrii Nagirniak 2011-10-11 10:06:36 +11:00
parent 6bc9ef43c9
commit 447dc60ede
2 changed files with 9 additions and 1 deletions

View File

@ -36,6 +36,13 @@ module Guard
@@rails_booted = true @@rails_booted = true
end end
def clean
Rake::Task["tmp:cache:clear"].execute
# copy from the "assets:clean" Rake task
config = ::Rails.application.config
public_asset_path = File.join(Rails.public_path, config.assets.prefix)
rm_rf public_asset_path, :secure => true
end
def precompile def precompile
config = Rails.application.config config = Rails.application.config
@ -73,6 +80,7 @@ module Guard
self.class.boot_rails self.class.boot_rails
return false unless @@rails_booted return false unless @@rails_booted
begin begin
clean
precompile precompile
true true
rescue => e rescue => e

View File

@ -1,5 +1,5 @@
module Guard module Guard
module RailsAssetsVersion module RailsAssetsVersion
VERSION = "0.1.0" VERSION = "0.1.1"
end end
end end