Commit 59f555e introduced a following problem, Gem.locate_guard returns incorrect path.
Before aforementioned commit the method was returning a path to gem folder, eg:
$ gem open guard-minitest --latest --command echo
But after the commit it returns:
$ gem which guard/minitest
And since Guard::Guard.init depends on this method, there is an error when you trying to init specific guard:
$ guard init minitest
Writing new Guardfile to /Users/brainopia/code/rails/ororo/Guardfile
/Users/brainopia/.rvm/gems/ruby-1.9.2-p180/gems/guard-0.3.1/lib/guard/guard.rb:15:in `read': Not a directory - /Users/brainopia/.rvm/gems/ruby-1.9.2-p180/gems/guard-minitest-0.3.0/lib/guard/minitest.rb/lib/guard/minitest/templates/Guardfile (Errno::ENOTDIR)
I've fixed this problem without reintroducing dependency on open_gem with following line of code:
Fix Guard.locate_guard to return path to gem folder
Hey thanks, that looks great indeed!
Thanks, I was just about to fix this!