Skip to content

Instantly share code, notes, and snippets.

@codeprimate
Created October 22, 2011 16:29
Show Gist options
  • Save codeprimate/1306170 to your computer and use it in GitHub Desktop.
Save codeprimate/1306170 to your computer and use it in GitHub Desktop.
Rake task to create ctags for a Rails application
# ctags.rake - Rake task to create ctags for a Rails application
# and also including Ruby and Gem signatures
#
# Requires exuberant-ctags to be in $PATH
desc "Regenerate tags (CTAGS)"
task :ctags do
puts " * Regenerating Tags"
excludes = %w{
.git
app/views/
coverage
test/coverage
doc
features
log
tmp
}
excludes_options = excludes.map{|e| "--exclude=#{e}"}.join(' ')
system("exuberant-ctags -V -a -R #{excludes_options} * `gem environment | grep INSTALLATION | awk '{print $4}'`/*")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment