diff --git a/lib/guard/rails-assets/rails_runner.rb b/lib/guard/rails-assets/rails_runner.rb index 1311252..235682e 100644 --- a/lib/guard/rails-assets/rails_runner.rb +++ b/lib/guard/rails-assets/rails_runner.rb @@ -36,6 +36,13 @@ module Guard @@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 @@ module Guard self.class.boot_rails return false unless @@rails_booted begin + clean precompile true rescue => e diff --git a/lib/guard/version.rb b/lib/guard/version.rb index 1a40650..3c14905 100644 --- a/lib/guard/version.rb +++ b/lib/guard/version.rb @@ -1,5 +1,5 @@ module Guard module RailsAssetsVersion - VERSION = "0.1.0" + VERSION = "0.1.1" end end