Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

do clean the assets

  • Loading branch information...
commit 447dc60ededf4f330463e3e61f9a9a53a3efbb2a 1 parent 6bc9ef4
Dmytrii Nagirniak authored
Showing with 9 additions and 1 deletion.
  1. +8 −0 lib/guard/rails-assets/rails_runner.rb
  2. +1 −1  lib/guard/version.rb
8 lib/guard/rails-assets/rails_runner.rb
View
@@ -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
2  lib/guard/version.rb
View
@@ -1,5 +1,5 @@
module Guard
module RailsAssetsVersion
- VERSION = "0.1.0"
+ VERSION = "0.1.1"
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.