Permalink
Browse files

update bundled tags in separate process

  • Loading branch information...
1 parent f2b45ad commit ee9d86af9fd198ae1f082a551ed352e9adcd58f7 @ivalkeen committed Jul 3, 2012
Showing with 10 additions and 5 deletions.
  1. +9 −4 lib/guard/ctags-bundler/ctags_generator.rb
  2. +1 −1 lib/guard/ctags-bundler/version.rb
@@ -8,10 +8,15 @@ def generate_project_tags
end
def generate_bundler_tags
- definition = Bundler::Definition.build("Gemfile", "Gemfile.lock", nil)
- runtime = Bundler::Runtime.new(Dir.pwd, definition)
- paths = runtime.requested_specs.map(&:full_gem_path)
- generate_tags(paths, "gems.tags")
+ # this code doesn't work with recent bundler versions
+ #definition = Bundler::Definition.build("Gemfile", "Gemfile.lock", nil)
+ #runtime = Bundler::Runtime.new(Dir.pwd, definition)
+ #paths = runtime.requested_specs.map(&:full_gem_path)
+ #generate_tags(paths, "gems.tags")
+
+ # this is ugly, but should work with every bundler version
+ paths = `ruby -e "require('bundler'); puts(Bundler.load.specs.map(&:full_gem_path).join(' '))"`
+ generate_tags(paths.strip, "gems.tags")
end
private
@@ -1,7 +1,7 @@
module Guard
module Ctags
module Bundler
- VERSION = "0.1.0"
+ VERSION = "0.1.1"
end
end
end

0 comments on commit ee9d86a

Please sign in to comment.