Browse files

do clean the assets

  • Loading branch information...
1 parent 6bc9ef4 commit 447dc60ededf4f330463e3e61f9a9a53a3efbb2a @dnagir committed Oct 11, 2011
Showing with 9 additions and 1 deletion.
  1. +8 −0 lib/guard/rails-assets/rails_runner.rb
  2. +1 −1 lib/guard/version.rb
View
8 lib/guard/rails-assets/rails_runner.rb
@@ -36,6 +36,13 @@ def self.boot_rails
@@rails_booted = true
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
config = Rails.application.config
@@ -73,6 +80,7 @@ def compile_assets
self.class.boot_rails
return false unless @@rails_booted
begin
+ clean
precompile
true
rescue => e
View
2 lib/guard/version.rb
@@ -1,5 +1,5 @@
module Guard
module RailsAssetsVersion
- VERSION = "0.1.0"
+ VERSION = "0.1.1"
end
end

0 comments on commit 447dc60

Please sign in to comment.