[Rubygems-developers] The deprecation of autorequire
hgs at dmu.ac.uk
Thu Jan 15 10:37:41 EST 2009
On Thu, 15 Jan 2009, Austin Ziegler wrote:
> On Thu, Jan 15, 2009 at 12:17 AM, Chad Woolley <thewoolleyman at gmail.com> wrote:
> Some of this might be helped if RubyGems provided a "default require"
> piece of metadata that could be queried about a gem. One of the
> complaints that I've heard—and don't really have a fix for—is that the
> names of gems and what you require are different. When I was working
> on PDF::Writer, for example, it was:
> gem 'pdf-writer', '=1.1.8'
> require 'pdf/writer'
> If we had a way of querying a gem for it's "full require" or "default
> require", it might help at least with exploration of a gem. One way
> that we could do this is to make it so that the "gem" command returns
> a read-only copy of the spec:
> pdf_writer = gem 'pdf-writer', '=1.1.8'
> require pdf_writer.default_require
> Or something like that.
Agreed. I was about to write "why not make that gem command do the
require?", but there are times when you only want parts of a package
distributed as a gem: Facets had core parts, etc. So maybe this
metadata should be a hash, one key being :complete, and the values
being things it would make sense to pass to require, by design.
Thus it would help further with exploration of a gem, the "software
More information about the Rubygems-developers