[Rubygems-developers] Loose end: mirror on Windows

Luis Lavena luislavena at gmail.com
Tue Dec 18 02:29:03 EST 2007


Guys,

Couldn't check all the ends and pieces of RubyGems on Windows yet (is
monday, week day) :-P

Anyway, gem mirror was failing when trying to mirror a file:/// URI,
which is the test case

URI.parse is broken for Windows, drive letters are still inside it:

irb(main):001:0> require 'uri'
=> true
irb(main):002:0> URI.parse Dir.pwd
=> #<URI::Generic:0x26b4c0a URL:D:/Users/Luis>
irb(main):003:0> URI.parse "file://#{Dir.pwd}"
=> #<URI::Generic:0x26b338c URL:file://D/Users/Luis>
irb(main):004:0> URI.parse "file:///#{Dir.pwd}"
=> #<URI::Generic:0x26b1ac8 URL:file:/D:/Users/Luis>
irb(main):005:0> URI.parse("file:///#{Dir.pwd}").to_s
=> "file:/D:/Users/Luis"

The included patch check with a regex if get_from contains a drive
letter (only if scheme is file) and grab the correct part of it.

I need to check the --source option of install, list and others to see
them working properly.

I noticed this reading the mails from Chad and Eric about gem server...

Good nights everyone.
-- 
Luis Lavena
Multimedia systems
-
A common mistake that people make when trying to design
something completely foolproof is to underestimate
the ingenuity of complete fools.
Douglas Adams
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mirror_command-ignores-file-scheme-under-windows.patch
Type: application/octet-stream
Size: 1408 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/rubygems-developers/attachments/20071218/2098faa9/attachment.obj 


More information about the Rubygems-developers mailing list