Skip to content

Instantly share code, notes, and snippets.

@nclark
Created February 12, 2011 03:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nclark/823473 to your computer and use it in GitHub Desktop.
Save nclark/823473 to your computer and use it in GitHub Desktop.
create ctags for all your gems using Gemfile.lock
#!/usr/bin/ruby
require 'bundler'
lockfile_contents = Bundler.read_file('Gemfile.lock')
lockfile = Bundler::LockfileParser.new(lockfile_contents)
paths = lockfile.specs.collect do |spec|
spec.__materialize__
spec.full_gem_path
end
system("ctags --extra=+f -R * #{paths.join('/* ') + '/*'}")
@andyl
Copy link

andyl commented Feb 18, 2011

Thanks for posting this !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment