Inconsistence between rails and bundler when scaffolding gems

Sometimes I use bundle gem ..., sometimes I use rails plugin new ... to create new gem scaffold.

The rails plugin generator does not allow dashes in names, while the bundle command does.

https://github.com/rails/rails/blob/master/railties/lib/rails/generators/rails/plugin/plugin_generator.rb#L311

https://github.com/bundler/bundler/blob/master/lib/bundler/cli.rb#L759

I want to start a public discussion about:

  • What is the intention that rails does not allow dashes
  • Lets make the gem naming consistent between bundler and the rails plugin generator, either on rails side, or on side of bundler.
    I don’t see any drawbacks of using dashes in gem names, so I would like to send a PR that enables one to use dashes.

Thanks

Robin,

You are right. The rails plugin generator should allow dashes in names. The convention is to use a dash when writing a gem that extends another gem, and to use an underscore when there are multiple words in your gem name.

See http://stackoverflow.com/a/8961409/468618 and http://guides.rubygems.org/name-your-gem/.

So yes, write that pull request.

Brian

I am facing the same issue; has any progress been made on this namespacing issue?