tag:help.rubygems.org,2010-01-19:/discussions/questions/76-how-to-name-a-gem-which-is-a-ruby-wrapper-for-an-existing-c-libraryRubyGems.org: Discussion 2011-08-09T13:18:25Ztag:help.rubygems.org,2010-01-19:Comment/91668322011-08-08T19:58:07Z2011-08-08T19:58:07ZHow to name a gem which is a Ruby wrapper for an existing C library?<div><p>Hello,</p>
<p>Naming the gem, while not following <em>recommended</em>
RubyGems practices, are not related to what the gem does.</p>
<p>For example, Psych is a gem that wraps libyaml library for YAML
emitter.</p>
<p>Rugged is the wrapper around libgit2.</p>
<p>And there are other examples.</p>
<p>One simple example, sqlite3-ruby, it was known as SQLite3/Ruby
bindings, which recently got renamed to simple "sqlite3"</p>
<p>MySQL/Ruby library which is distributed as "mysql" gem.</p>
<p>You're free to name the gem as you like, as long is not
inflammatory or disrespectful of other members or libraries in the
community like "railssucks" or things like that.</p>
<p>The guides do not cover it in too much detail:</p>
<p><a href=
"http://guides.rubygems.org/patterns/#consistent-naming">http://guides.rubygems.org/patterns/#consistent-naming</a></p>
<p>But Eric Hodel, one of the maintainers of RubyGems outlined his
preferences about the conventions:</p>
<p><a href=
"http://blog.segment7.net/2009/05/20/a-project-naming-recommendation">
http://blog.segment7.net/2009/05/20/a-project-naming-recommendation</a></p>
<p>Hope that helps.</p></div>Luis Lavenatag:help.rubygems.org,2010-01-19:Comment/91668322011-08-09T06:24:19Z2011-08-09T06:24:21ZHow to name a gem which is a Ruby wrapper for an existing C library?<div><p>Thanks. I think in my case it would be better to name the gem
simply after the name of the C library, like <code>mysql</code> or
<code>sqlite3</code>. Clearly gems are for Ruby, so it doesn't make
a lot of sense to add <code>-ruby</code> or <code>_ruby</code> to
the gem name...</p>
<p>The only thing I don't like is having a github project named
after the original library name, because it can be mistaken for as
the official repository for the C library (consider the
<code>yajl</code> repository which has the C library code). I think
I'll follow your move with <code>sqlite3</code>: the github
repository name will have the <code>-ruby</code> suffix, but the
gem name (in gemspec) will be simply the library name.</p>
<p>Makes sense?</p></div>dubektag:help.rubygems.org,2010-01-19:Comment/91668322011-08-09T13:18:20Z2011-08-09T13:18:20ZHow to name a gem which is a Ruby wrapper for an existing C library?<div><p>Makes totally sense.</p>
<p>Glad this helped you. Closing out.</p>
<p>Feel free to reopen if you have further questions.</p></div>Luis Lavena