[Rubygems-developers] What is right and wrong with dependencies definitions?

Chad Woolley thewoolleyman at gmail.com
Tue Nov 6 22:58:45 EST 2007


On 11/6/07, Luis Lavena <luislavena at gmail.com> wrote:
> What is the best approach for this? Include everything as dependency?

I think you should only include actual runtime dependencies in the gem
spec, not test- or build-time dependencies.  For these, you can throw
an exception at the beginning of your rake task or spec helper,
specifying which ones are needed but missing.  As for Hoe, I hacked
myself an "IndependentHoe" for my gem, because I had no other
dependencies, and I KNOW i didn't need Hoe at runtime.

If you are REALLY cool, I'd recommend my GemInstaller tool to
centrally and _automatically_  manage test- and build-time
dependencies (both installation AND loading) separately from your
runtime dependencies.   I've been delaying to promote GemInstaller
heavily until I update it to take advantage of all the latest cool
platform-related stuff in the beta RubyGems release.  But it works
fine, and is in production use on several apps now, and your original
topic is a perfect use for it.

-- Chad


More information about the Rubygems-developers mailing list