Hola
Hola

Reputation: 165

Why is a gem specification needed and why do some gem creators not provide them?

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?

Upvotes: 1

Views: 385

Answers (2)

Henry
Henry

Reputation: 423

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

Upvotes: 0

Ben Hughes
Ben Hughes

Reputation: 14195

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.

Upvotes: 4

Related Questions