updated README, removed obsolete spec

This commit is contained in:
Dmytrii Nagirniak 2011-06-24 14:24:28 +10:00
parent 8424beee1e
commit ce9a83bd81
3 changed files with 4 additions and 13 deletions

View File

@ -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

View File

@ -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

View File

@ -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