Tom Copeland wrote:
I wanted to run some ideas by you. One of the big changes scheduled for RubyGems 0.9.0 is how the gem command downloads the gem index from RubyForge. Currently, gem grabs the entire wad of gem specs if it detects that the size of the index file has changed. The new version will incrementally download only those gems that have been updated since the last download. Hopefully this will cut down download bandwidth a bit and speed up the end user experience.Hi Jim - Sounds great! Yup, I've talked with Rich about this a bit.
Tom, here is the software to generate the rubygems server index files. The script is index_gem_repository.rb and is called as follows:
index_gem_repository.rb -d REPO_DIRECTORYWhere REPO_DIRECTORY is where the yaml file is currently placed. In addition to the standard yaml/yaml.Z files produced, it will also produce a quick directory containing each gem spec individually zipped and ready for incremental downloads.
If you want to see output while the script runs, just include a --verbose option. There's a --help option too.
Although this will be part of the gem 0.9.0 release, I've tested it with version 0.8.0 and it will work fine, so you don't have to upgrade your entire gem setup on the machine to try this out.
I've tested this quite a bit on my personal gem repository and am confident it won't break existing gem downloads, it probably a good a idea keep the old indexing software around (just in case :).
Once you start running this on RubyForge, I will put together a beta release of gems for limited distribution for testing the incremental downloads.
Thanks. -- -- Jim Weirich [EMAIL PROTECTED] 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)
index_gem_repository.rb
Description: application/ruby
_______________________________________________ Rubygems-developers mailing list [email protected] http://rubyforge.org/mailman/listinfo/rubygems-developers
