On Aug 29, 2007, at 21:15, Eric Hodel wrote:
> On Aug 27, 2007, at 20:08, Ryan Davis wrote:
>> On Aug 27, 2007, at 10:51 , Jim Weirich wrote:
>>> On Aug 26, 2007, at 4:03 PM, Eric Hodel wrote:
>>>> On Aug 25, 2007, at 19:42, Chad Woolley wrote:
>>>>> Sounds great. I'll play with it. Do you have to package it,
>>>>> or is
>>>>> there a tag, or just use trunk?
>>>>
>>>> svn+ssh://rubyforge.org/var/svn/rubygems/tags/REL_0_9_4_4
>>>>
>>>> I sent packages to Jim, he should announce them in the next day or
>>>> two when he gets a spare moment.
>>>
>>> I'm having a problem with the beta version. It complains about the
>>> POpen gem. I uninstalled POpen and reinstalled it using the beta,
>>> but it still fails.
>>
>> Try this (made against head, but should apply to either?):
>>
>> Index: test/test_gem_specification.rb
>> ===================================================================
>> --- test/test_gem_specification.rb (revision 1378)
>> +++ test/test_gem_specification.rb (working copy)
>> @@ -454,6 +454,17 @@
>> @a0_0_1.platform = Gem::Platform::DARWIN
>> assert_equal ['powerpc', 'darwin', nil], @a0_0_1.platform
>> +
>> + util_set_arch 'i686-linux'
>> + @a0_0_1.platform = Gem::Platform::UNIX
>> + assert_equal Gem::Platform.local, @a0_0_1.platform
>> +
>> + %w(java mswin32 mingw32).each do |arch|
>> + util_set_arch arch
>> + assert_raises Gem::Exception do
>> + @a0_0_1.platform = Gem::Platform::UNIX
>> + end
>> + end
>> end
>> def test_require_paths
>> Index: lib/rubygems/specification.rb
>> ===================================================================
>> --- lib/rubygems/specification.rb (revision 1378)
>> +++ lib/rubygems/specification.rb (working copy)
>> @@ -297,7 +297,11 @@
>> @platform = Gem::Platform::X86_LINUX
>> when Platform::DARWIN then
>> @platform = Gem::Platform::PPC_DARWIN
>> -
>> + when Platform::UNIX then
>> + @platform = Gem::Platform.local
>> + raise Gem::Exception,
>> + "invalid platform #{platform.inspect}, see
>> Gem::Platform" if
>> + @platform[1] =~ /mswin|mingw|java/ # HACK prolly should go
>> a more heirarchical route
>> else
>> raise Gem::Exception,
>> "invalid platform #{platform.inspect}, see Gem::Platform"
>
> My thought for raising the exception was to make gem authors switch
> from whichever string they thought was appropriate (like "unix" or
> "win32-1.8.2-VC7") to Gem::Platform::CURRENT. It shouldn't be raised
> when evaling a gemspec.
>
> I don't like the code that would be needed (checking the stack) to
> make that work. Maybe it should just be dropped and a HACK tag added
> pointing to the POpen4 gem?
Ok, this is handled in Gem::Specification#validate now, which is
called in Gem::Builder. Now only builders of the gem will see the
error, which is as it should be.
--
Poor workers blame their tools. Good workers build better tools. The
best workers get their tools to do the work for them. -- Syndicate Wars
_______________________________________________
Rubygems-developers mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rubygems-developers