Guard::Librarian

Librarian guard allows to automatically & intelligently install/update chef cookbooks when needed.

Install

Please be sure to have Guard installed before continue.

Install the gem:

gem install guard-librarian

Add it to your Gemfile:

gem 'guard-librarian'

Add guard definition to your Guardfile by running this command:

guard init librarian

Usage

Please read Guard usage doc

Guardfile

Simple example

guard 'librarian' do
  watch('Cheffile')
end

Options

You can pass options to librarian-chef with:

guard 'librarian', :cli => '--clean --verbose' do
  ...
end

By default it will run on start, but this can be disabled with :run_on_start => false.

When it runs on start, it will assume your Cheffile is in the current directory containing your Guardfile. (It doesn't look at the paths specified by your 'watch' commands except when those files change.) So if your Cheffile is in a subdirectory, you will probably see “Cannot find Cheffile!” and will want to set :run_on_start => false.

You can disable desktop notification with:

guard 'librarian', :notify => false do
  ...
end

Please read Guard doc for more info about Guardfile DSL.

Development

Pull requests are very welcome! Make sure your patches are well tested. Please create a topic branch for every separate change you make.

Authors

Yann Lugrin (created guard-bundler) Tyler Rick (adapted guard-bundler to work with Cheffile)