[Rubygems-developers] gem server problems in 0.9.5

Chad Woolley thewoolleyman at gmail.com
Mon Dec 17 22:20:21 EST 2007

On Dec 17, 2007 7:32 PM, Chad Woolley <thewoolleyman at gmail.com> wrote:
> On Dec 17, 2007 4:35 PM, Eric Hodel <drbrain at segment7.net> wrote:
> > Fixed.
> This is getting closer, but there are still a couple of gems that have
> problems.  Also, I had to actually install the trunk version to get it
> to pick up a couple of them, which seems to indicate that "-I"
> approach of running a specific version sometimes still uses installed
> rubygems files.

Now that you showed me where the problems are, I came up with a
failing test for the remaining problems:

  def test_quick_a_1_ab_1_gemspec_rz_duplicate_gem_name_substrings_do_not_cause_multiple_gem_errors
    ab1 = quick_gem 'ab', '1'
    si = Gem::SourceIndex.new @a1.full_name => @a1, ab1.full_name => ab1
    @server.source_index = si

    data = StringIO.new "GET /quick/a-1.gemspec.rz HTTP/1.0\r\n\r\n"
    @req.parse data

    @server.quick @req, @res

    assert_equal 200, @res.status
    assert @res['date']
    assert_equal 'text/plain', @res['content-type']
    yaml = Zlib::Inflate.inflate(@res.body)
    assert_match %r|Gem::Specification|, yaml
    assert_match %r|name: a|, yaml
    assert_match %r|version: "1"|, yaml

I'll try to patch this if you don't beat me to it.  Gotta go play with
my son now :)

-- Chad

More information about the Rubygems-developers mailing list