diff --git a/README.md b/README.md index 45133af..8399ac8 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ Guard::RailsAssets compiles all the assets in Rails 3.1 application automatically when files are modified. Tested on MRI Ruby 1.9.2 (please report if it works on your platform). -Currently only POSIX system is supported. Sorry Windows guys :( If you have any questions please contact me [@dnagir](http://www.ApproachE.com). @@ -35,14 +34,9 @@ explicitly depend on Rails. Good thing about it is that assets will always be same as produced by Rails. Bad thing is that it is pretty slow (~10 seconds) because it starts Rails from ground zero. -## Rails Assets Pipeline +*NOTE*: The guard runs the `rake assets:clean assets:precopile`. +As of current Rails 3.1 edge that means that the assets will be deleted before they are compiled. -The conventions used in this guard are: - -- assets prefix is set to 'assets' meaning that all assets are compiled in to `public/assets` directory; -- the assets directory is disposable and can be cleared out. - -If the conventions above are not valid for you then perhaps you'd better submit a patch. ## Guardfile and Options diff --git a/lib/guard/rails-assets/templates/Guardfile b/lib/guard/rails-assets/templates/Guardfile index b116015..9ee0ecb 100644 --- a/lib/guard/rails-assets/templates/Guardfile +++ b/lib/guard/rails-assets/templates/Guardfile @@ -1,5 +1,5 @@ -# Make sure this guard is ABOVE any guards using assets such as jasmine-headless-webkit +# Make sure this guard is ABOVE any other guards using assets such as jasmine-headless-webkit # It is recommended to make explicit list of assets in `config/application.rb` # config.assets.precompile = ['application.js', 'application.css', 'all-ie.css'] guard 'rails-assets' do diff --git a/spec/guard/rails-assets_spec.rb b/spec/guard/rails-assets_spec.rb index 4dc915d..67b14f5 100644 --- a/spec/guard/rails-assets_spec.rb +++ b/spec/guard/rails-assets_spec.rb @@ -5,10 +5,6 @@ describe Guard::RailsAssets do let(:options) { {} } subject { Guard::RailsAssets.new(['watchers'], options) } - it 'should be able to create guard' do - ::Guard::RailsAssets.new(['watchers'], {:options=>:here}).should_not be_nil - end - describe '#start' do it_behaves_like 'guard command', :command => :start, :run => true end @@ -36,6 +32,7 @@ describe Guard::RailsAssets do Guard::Notifier.should_receive(:notify).with('Assets compiled') subject.compile_assets end + it 'should notify on failure' do stub_system_with false subject.should_not_receive(:`) # don't obtain tree