Skip to content

Instantly share code, notes, and snippets.

@baroquebobcat
Created April 27, 2010 22:31
Show Gist options
  • Select an option

  • Save baroquebobcat/381434 to your computer and use it in GitHub Desktop.

Select an option

Save baroquebobcat/381434 to your computer and use it in GitHub Desktop.

When making a new gem, should you use underscores or dashes in the name?

Well, there are ~12,000 gems(rubygems.org/ says 12,442) $ gem list -r | wc -l 12202 Of which ~6,000 have underscores or dashes in their name $ gem list -r | grep -e '-|' -c 6022 dash has more than than underscore $ gem list -r | grep -c '-' 3570 $ gem list -r | grep -c '' 2734 and there are even a few with both $ gem list -r | grep '_' | grep '-' -c 282

Dash has a fair lead, and is also domain-name friendly. So, for my next project, I'll probably use it as the spacer in my gem's name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment