From: Gavin Sinclair Date: 2004-09-16T13:30:12+09:00 Subject: Re: [ANN] RubyGems 0.8.0 Thanks Chad; this is a groovilicious release. For the collective readership's benefit, I'd like to provide a few comments. The library stub thing is dead. If you do this: require 'rubygems' require 'active_record' # (A) then line (A) will cause 'active_record' to be loaded either from site_ruby or from a gem (any gem). This gives us the transparency we've been looking for. I believe a 'site_ruby' install will get first preference, so if you have version requirements [1], then you should do this: require 'rubygems' require_gem 'active_record', '= 0.7.9' Rich strongly recommends setting the environment variable RUBYOPT to 'rubygems'. That's something each user has to do. I recommend that developers make it easy for their users by including code like this: begin require 'ubygems' # (B) rescue LoadError warn "Don't have RubyGems 0.8+" if thats_a_concern? end require 'active_record' This will now work on any user's machine, whether they have RubyGems installed or not, and whether they've set their RUBYOPT variable or not. Note: line (B) will work from RubyGems 0.8+ but not RubyGems 0.7-. That's the idea. Thanks for all the cool gems people have contributed. Now that this release is out, I'm going to contribute some myself :) Some comments on other features: * If your unit tests are in the 'test' directory of your project, and are all named 'tc_*.rb', then include this in your gemspec: spec.test_files = Dir.glob('test/tc_*.rb') * If you have a test _suite_ file, which loads all the other tests, you can put this in instead: spec.test_file = 'test/test_suite.rb' * If you have _several_ test suite files, spec.test_files = Dir.glob('test/ts_*.rb') * The 'spec' and 'unpack' commands only work with _installed_ gems. I'll extend these commands to other gems for the next release. 'unpack' is useful for taking a look inside a package. For example, gem unpack rake will create the directory './rake-0.4.7', or whatever your latest installed versions is. Remember to take a look at the "Package Management with RubyGems" chapter from Pickaxe II, available at http://www.pragmaticprogrammer.com/titles/ruby/ Remember also that RubyGems isn't the only game in town. Mauricio is doing a fine job with RPA. The two projects overlap somewhat, but serve slightly different purposes. Please try to organise your code and project so that it can be easily packaged into a gem, into the RPA, into a Debian/RPM/ebuild/... If you have any questions about this, fire away. Cheers, Gavin Chad wrote: > Marking the 3000th download of RubyGems > (http://rubygems.rubyforge.org), we are pleased to announce the release > of RubyGems 0.8.0! [........]