add basic readme, mess w/ logging some more
This commit is contained in:
parent
752d930935
commit
949c7c17e2
|
@ -0,0 +1,7 @@
|
|||
Using [Varnish](https://www.varnish-cache.org/) with your app? Want to test your caching goodness locally first? Don't want to deal with
|
||||
craaaazy global VCLs or manually restarting things? `guard-lacquer` is what you want!
|
||||
|
||||
It wraps up the server running parts of Lacquer, abstracts out their Rails-isms, and starts and stops them just like any other Guard!
|
||||
If you don't have a `config/config.vcl.erb` file in your app for use with Lacquer, it copies that over for you, too.
|
||||
|
||||
|
|
@ -32,8 +32,8 @@ module Guard
|
|||
)
|
||||
end
|
||||
|
||||
@frontend = Varnishd.new(@options)
|
||||
@logger = VarnishNCSA.new(@options)
|
||||
@runners = [ Varnishd.new(@options) ]
|
||||
@runners << VarnishNCSA.new(@options) if @options[:log_dir]
|
||||
|
||||
if !File.file?(varnish_erb = 'config/varnish.vcl.erb')
|
||||
UI.info "No config/varnish.vcl.erb found, copying default from Lacquer..."
|
||||
|
@ -44,7 +44,7 @@ module Guard
|
|||
end
|
||||
|
||||
def start
|
||||
[ @frontend, @logger ].each do |which|
|
||||
@runners.each do |which|
|
||||
which.stop if which.running?
|
||||
which.start
|
||||
end
|
||||
|
@ -53,7 +53,7 @@ module Guard
|
|||
end
|
||||
|
||||
def stop
|
||||
[ @frontend, @logger ].each(&:stop)
|
||||
@runners.each(&:stop)
|
||||
|
||||
notify "Until next time..."
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue