views:

231

answers:

2

I've noticed some ruby gems have .specification files and others don't.

If they're important, why are you not required (by whatever tool builds them) to provide one when you attempt to create your gem?

+4  A: 

Many gems are configured using hoe or newgem, which generate a specification only on the building of the gem. The spec is treated as a temporary bit of code only used to create a gem so it is typically not packaged up. There are rake tasks for both of these tools that will generate a spec file though.

Ben Hughes
"There are rake tasks for both of these tools that will generate a spec file though." -> Are you suggesting running newgem on a gem that was not packaged with a spec file in order to generate one for the gem? Should that work the same on a downloaded gem as it would if the creator of the gem ran the same command? (by the way, it looks like you maxed out your karma for the day)
Hola
if it was packaged with hoe, you should gem install hoe, and then in the gem's folder, you should have the rake task debug_gem. That task dumps the actual specification to the console. (yeah, I think I need a new hobby)
Ben Hughes
thanks !
Hola
A: 

Some times the gem spec is in the Rakefile rather than a separate gemspec.

Henry