Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Guard::Annotate automatically runs the annotate gem when needed
Ruby
branch: master

This branch is 7 commits ahead, 5 commits behind cpjolicoeur:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/guard
spec
.gitignore
.rspec
.travis.yml
CHANGELOG
Gemfile
Guardfile
LICENSE
README.rdoc Version bump
Rakefile
guard-annotate.gemspec

README.rdoc

Guard::Annotate

Annotate guard runs the annotate gem when needed

  • Compatible with Annotate 2.4.x

  • Tested on Ruby 1.8.7, 1.9.x, 2.1.x

Install

Install the gem:

gem install guard-annotate

Add the gem to your Gemfile:

gem 'guard-annotate'

Add guard definitions to your Guardfile by running:

guard init annotate

Usage

Please read the Guard usage docs

Guardfile

Standard Ruby on Rails project

guard 'annotate' do
  watch( 'db/schema.rb' )
  # Uncomment the following line if you also want to run annotate anytime
  # a model file changes
  #watch( 'app/models/**/*.rb' )
end

Options

You can disable desktop notifications with (default is notifications are enabled):

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

You can customize the placement of the annotations with (default is 'before'):

guard 'annotate', :position => 'before|after' do
  ...
end

You can choose to also annotate your routes file with true, false or 'before'/'after' (default is false):

guard 'annotate', :routes => 'before|after' do
  ...
end

You can annotate your tests and fixtures files with (default is false):

guard 'annotate', :tests => true do
  ...
end

You can exclude annotations in factory files with (default is true):

guard 'annotate', :factories => false do
  ...
end

You can exclude annotations in serializers with (default is true):

guard 'annotate', :serializers => false do
  ...
end

You can disable run at start with (default is true):

guard 'annotate', :run_at_start => false do
  ...
end

You can annotate indexes on your models with (default is false):

guard 'annotate', :show_indexes => true do
  ...
end

You can add simple indexes to the column information (default is false):

guard 'annotate', :simple_indexes => true do
  ...
end

You can show migration version number in the annotation (default is false):

guard 'annotate', :show_migration => true do
  ...
end

You can annotate in three different formats: :bare, :rdoc and :markdown (default is :bare):

guard 'annotate', :format => :rdoc do
  ...
end

Development

Authors

Craig P Jolicoeur

Something went wrong with that request. Please try again.