updated README, removed obsolete spec
This commit is contained in:
parent
8424beee1e
commit
ce9a83bd81
10
README.md
10
README.md
@ -4,7 +4,6 @@
|
|||||||
Guard::RailsAssets compiles all the assets in Rails 3.1 application automatically when files are modified.
|
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).
|
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).
|
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.
|
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.
|
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
|
## Guardfile and Options
|
||||||
|
|
||||||
|
@ -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`
|
# It is recommended to make explicit list of assets in `config/application.rb`
|
||||||
# config.assets.precompile = ['application.js', 'application.css', 'all-ie.css']
|
# config.assets.precompile = ['application.js', 'application.css', 'all-ie.css']
|
||||||
guard 'rails-assets' do
|
guard 'rails-assets' do
|
||||||
|
@ -5,10 +5,6 @@ describe Guard::RailsAssets do
|
|||||||
let(:options) { {} }
|
let(:options) { {} }
|
||||||
subject { Guard::RailsAssets.new(['watchers'], 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
|
describe '#start' do
|
||||||
it_behaves_like 'guard command', :command => :start, :run => true
|
it_behaves_like 'guard command', :command => :start, :run => true
|
||||||
end
|
end
|
||||||
@ -36,6 +32,7 @@ describe Guard::RailsAssets do
|
|||||||
Guard::Notifier.should_receive(:notify).with('Assets compiled')
|
Guard::Notifier.should_receive(:notify).with('Assets compiled')
|
||||||
subject.compile_assets
|
subject.compile_assets
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should notify on failure' do
|
it 'should notify on failure' do
|
||||||
stub_system_with false
|
stub_system_with false
|
||||||
subject.should_not_receive(:`) # don't obtain tree
|
subject.should_not_receive(:`) # don't obtain tree
|
||||||
|
Loading…
Reference in New Issue
Block a user