Inconsistence between rails and bundler when scaffolding gems

141 views
Skip to first unread message

Robin Böning

unread,
Dec 22, 2013, 5:14:37 PM12/22/13
to rubyonra...@googlegroups.com

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

Brian Morearty

unread,
Dec 26, 2013, 2:17:19 AM12/26/13
to rubyonra...@googlegroups.com
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.


So yes, write that pull request.

Brian



--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-co...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
Visit this group at http://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/groups/opt_out.

Maher Hawash

unread,
Apr 17, 2014, 9:37:25 PM4/17/14
to rubyonra...@googlegroups.com
I am facing the same issue; has any progress been made on this namespacing issue?
Reply all
Reply to author
Forward
0 new messages