ivalkeen/guard-ctags-bundler — pull request #20 by rizzatti (2014-03-09 00:14:23+00:00)
Title: Fix guard init and Guardfile path

Currently (as of guard 2.5.1), right after adding guard-ctags-bundler to a Gemfile, we see the following output:
```
$ bundle exec guard init ctags-bundler ⏎ ✱ ◼
/Users/zeh/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/guard-2.5.1/lib/guard/plugin/base.rb:53:in `read': No such file or directory @ rb_sysopen - /Users/zeh/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/guard-ctags-bundler-1.0.1/lib/guard/ctagsbundler/templates/Guardfile (Errno::ENOENT)
from /Users/zeh/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/guard-2.5.1/lib/guard/plugin/base.rb:53:in `template'
from /Users/zeh/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/guard-2.5.1/lib/guard/plugin_util.rb:129:in `block in add_to_guardfile'
from /Users/zeh/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/guard-2.5.1/lib/guard/plugin_util.rb:126:in `open'
from /Users/zeh/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/guard-2.5.1/lib/guard/plugin_util.rb:126:in `add_to_guardfile'
from /Users/zeh/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/guard-2.5.1/lib/guard/guardfile/generator.rb:62:in `initialize_template'
from /Users/zeh/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/guard-2.5.1/lib/guard/guardfile.rb:30:in `initialize_template'
from /Users/zeh/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/guard-2.5.1/lib/guard/cli.rb:176:in `block in init'
from /Users/zeh/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/guard-2.5.1/lib/guard/cli.rb:175:in `each'
from /Users/zeh/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/guard-2.5.1/lib/guard/cli.rb:175:in `init'
from /Users/zeh/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
from /Users/zeh/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
from /Users/zeh/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
from /Users/zeh/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
from /Users/zeh/.rbenv/versions/2.1.0/lib/ruby/gems/2.1.0/gems/guard-2.5.1/bin/guard:6:in `'
from /Users/zeh/.rbenv/versions/2.1.0/bin/guard:23:in `load'
from /Users/zeh/.rbenv/versions/2.1.0/bin/guard:23:in `

'
```

The problem is that in Guard::Plugin, the definition of template does not account for plugin names with dashes or underscores, potentially breaking plugins that have such names, as shown in:
....../lib/guard/ctagsbundler/templates/Guardfile

The guard team has left up for the plugin authors to redefine that behaviour, as commented in their code, and this fixes the problem.

A second approach would be to change the return values for name and title, which in turn would show the correct values for the output of commands such as ``guard show``.