[Rubygems-developers] Getting ready for release 0.9.0

Jim Weirich jim at weirichhouse.org
Wed Jun 7 15:57:17 EDT 2006


Sorry this has taken so long.

I pondered long and hard over the datadir issue and finally decide to 
take a minimalist approach verify similar to Maruicio's first suggestion 
in http://tinyurl.com/b7yo9.  I am suggesting that people use 
Config.datadir(package_name) to locate their data directory.  In the 
absence of RubyGems, this will just resolve to 
File.join(Config::CONFIG['datadir'], package_name).  If RubyGems is 
present, it will locate the 'data' directory in the corresponding 
versioned gem area.

This has several real advantages:

* It is compatible with setup.rb (where the data directory defaults to 
'data').  A project can use a single directory structure to satisfy both 
the gem and setup.rb packaging requirements.

* The application remains unaware whether it is running as a gem or a 
directly installed app.

* It retains versioned data directories so that we don't break the 
multi-version nature of RubyGems.

The biggest downside is that Ruby does not natively support the 
Config.datadir() method.  I will propose this on the Ruby-core list if 
it passes muster here.  Until we get native support, anyone wishing to 
take advantage of the datadir method will have to include the following 
file with their application.

   module Config
     unless Config.respond_to?(:datadir)

       # Return the path to the data directory associated with the given
       # package name.  Normally this is just
       # "#{Config::CONFIG['datadir']}/#{package_name}", but may be
       # modified by packages like RubyGems to handle versioned data
       # directories.
       def Config.datadir(package_name)
         File.join(CONFIG['datadir'], package_name)
       end

     end
   end

Notice that is carefully checks for an existing datadir method, so if it 
does become available natively in Ruby, this file will degrade gracefully.

Thoughts?

On a second issue, we were contacted sometime back by an Apple 
representative asking for a clarification of the RubyGems license.  I've 
gone ahead and included the Ruby license (suitably modified for 
RubyGems) and the GPL (as referenced in the Ruby license) in the 
distribution, as was discussed at that time.  I also added copyright 
notices to each file, and referenced the LICENSE.txt file for details of 
any permissions.

As to who to reference in the copyright notice, I listed explicitly the 
three Rubyforge project Administrators for the RubyGems project, (that 
would be Chad Fowler, Rich Kilmer and me) and appended the phrase "and 
others" to cover all the contributions from the many people that have 
contributed over the years.  I don't want anyone to feel slighted by 
this, so if there are significant contributions that you would like to 
have called out, just let me know and will will add additional copyright 
notices on the appropriate files.  (Mauricio's copyright notice in 
package.rb was left as is).

Any questions?

I'll make a beta version soon and hopefully we can get a 0.9.0 release 
out very soon.

-- Jim Weirich



More information about the Rubygems-developers mailing list