[Rubygems-developers] New setup.rb

Eric Hodel drbrain at segment7.net
Fri Sep 28 16:43:20 EDT 2007


On Sep 28, 2007, at 10:04 , Berger, Daniel wrote:
>> I replaced the giant setup.rb with a small one we can easily debug.
>> It seems to fix all the issues people have been having.
>>
>> Please test it out on windows, I do not have one of those set up for
>> development.
>>
>> It also comes with --no-rdoc and --no-ri, and the gem updater has
>> been hooked into those options (and --prefix).  I still need to set
>> up and test updating through `gem update --system`, its a bit
>> more work.
>>
>> What's not well-documented is the difference between --prefix and
>> GEM_HOME, defining both to be the same is certainly not what people
>> want.  (This is true with all versions of RubyGems.)
>
> Assuming setup.rb has its own tests in the test suite somewhere,  
> here's
> the latest results (Ruby 1.8.6 one click, rake 0.7.3, Windows XP  
> Pro SP
> 2).

It doesn't, most of it is post-install.rb and pre-install.rb.  The  
bit in the middle is so stupid-simple that it shouldn't need tests  
(ha! yeah, I know...).

> Failures 5-9 look easy enough. I'm not sure what's happening with 1-4
> yet, though.

Probably missing 'b' flags.

> And, if setup.rb does NOT have separate tests, how/what would you like
> me to test?

Its the setup.rb that installs rubygems.

ruby setup.rb --prefix /some/test/path

Also, you can pass --no-rdoc and --no-ri and not build rdoc or ri  
respectively.

and you should be able to

ruby -I /some/test/path/lib /some/test/path/bin/gem env

There should also be gem.cmd file in /some/test/path/bin/ that works  
on windows.

> C:\Documents and Settings\djberge\workspace\rubygems>rake test
> (in C:/Documents and Settings/djberge/workspace/rubygems)
> ./test/test_gem_specification.rb:478: warning: ambiguous first  
> argument;
> put parentheses or even spaces
> ./test/test_gem_specification.rb:487: warning: ambiguous first  
> argument;
> put parentheses or even spaces

Fixed these guys

> Loaded suite
> C:/ruby/lib/ruby/gems/1.8/gems/rake-0.7.2/lib/rake/rake_test_loader
> Started
> Finished in 102.587 seconds.
>
>   1) Error:
> test_execute(TestGemCommandsMirrorCommand):
>
>   2) Error:
> test_generate_index(TestGemIndexer):
>
>   3) Error:
> test_generate_index_contents(TestGemIndexer):
>
>   4) Error:
> test_generate_index_ui(TestGemIndexer):

I flushed out a few more opens that were missing 'b's, but I don't  
know if that did it.

>   5) Failure:
> test_app_script_text(TestGemInstaller)
> [./test/test_gem_installer.rb:91]:
>
>   6) Failure:
> test_shebang(TestGemInstaller) [./test/test_gem_installer.rb:645]:
>
>   7) Failure:
> test_shebang_arguments(TestGemInstaller)
> [./test/test_gem_installer.rb:653]:
>
>   8) Failure:
> test_shebang_empty(TestGemInstaller) [./test/test_gem_installer.rb: 
> 660]:

Fixed all these that were missing the ".exe".

>   9) Failure:
> test_fetch_path_system_call_error(TestGemRemoteFetcher)
> [./test/test_gem_remote_fetcher.rb:257]:
> <"Errno::ECONNREFUSED: Connection refused - connect(2) reading uri">
> expected but was
> <"Errno::ECONNREFUSED: No connection could be made because the target
> machine actively refused it. - connect(2) reading
> uri">.

Bleh.  Fixed.

Thanks for testing!


More information about the Rubygems-developers mailing list