[Rubygems-developers] RubyGems Alpha II?

Jim Weirich jim at weirichhouse.org
Tue Mar 30 20:38:43 EST 2004


Chad Fowler wrote:
> # Wow, that's more tests than when I looked last time.  Someone has been busy!
> 
> :) Very modest start, but I have been trying.

Bravo!

> I like Simon's patch for what it is, but I'm still a little skeptical 
> about "require" modifying the load path.  Any other strong opinions?  Mine 
> isn't strong.

Here's an example.  I have a runtest.rb library as part of Rake that 
handles the details of running tests (and managing the -I part!).  If 
rake is installed as a non-gem, the command line to run the test is

   ruby -Ilib -rrake/runtest \
     -e 'Rake.run_tests("test/test*.rb", true)'

If rake is installed as a gem, then it needs to be ...

   ruby -Ilib -e 'require "rubygems"; require_gem "rake"' \
     -e 'require "rake/runtest"' \
     -e 'Rake.run_tests("test/test*.rb", true)'

I won't even mention the logic required to *detect* if rake is installed 
as a gem or not.

If Simon's patch is part of gem (and we assume gem is installed), then 
all I need for either case is ...

   ruby -rubygems -rrake/runtest \
     -e 'Rake.run_tests("test/test*.rb", true)'

And no detection logic is required!

Simon's patch really simplifies things for me (in this case).

-- 
-- Jim Weirich    jim at weirichhouse.org     http://onestepback.org
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)



More information about the Rubygems-developers mailing list