From drbrain at segment7.net Mon Dec 5 19:39:27 2005 From: drbrain at segment7.net (Eric Hodel) Date: Mon, 5 Dec 2005 16:39:27 -0800 Subject: [Rubygems-developers] $SAFE = 1 patch Message-ID: <7734EEE9-AAF0-4AF8-91F4-198B13E4FDB0@segment7.net> This patch lets Rubygems run with $SAFE = 1. -------------- next part -------------- A non-text attachment was scrubbed... Name: SAFE.patch Type: application/octet-stream Size: 3568 bytes Desc: not available Url : http://rubyforge.org/pipermail/rubygems-developers/attachments/20051205/b8d075e8/SAFE-0001.obj -------------- next part -------------- -- Eric Hodel - drbrain at segment7.net - http://segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com From jim.weirich at gmail.com Tue Dec 6 09:24:06 2005 From: jim.weirich at gmail.com (Jim Weirich) Date: Tue, 6 Dec 2005 09:24:06 -0500 Subject: [Rubygems-developers] $SAFE = 1 patch In-Reply-To: <7734EEE9-AAF0-4AF8-91F4-198B13E4FDB0@segment7.net> References: <7734EEE9-AAF0-4AF8-91F4-198B13E4FDB0@segment7.net> Message-ID: On 12/5/05, Eric Hodel wrote: > > This patch lets Rubygems run with $SAFE = 1. Excellent! And the change comes with a patch for the tests too! Extra points for that. But ... I added the $SAFE=1 to the test (per the patch file) and ran the tests (without the rest of your patch installed) ... and all the tests still pass. I expected to see failures because of $SAFE=1 mode. Is the test not testing what we think? On a slightly different note, shouldn't we do more than just untaint the string. I would have thought that at least some minimal validity checking would be appropriate ... after all, that's the reason the strings are tainted in the first place. -- -- -- Jim Weirich jim at weirichhouse.org 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) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20051206/69d905d2/attachment.htm From drbrain at segment7.net Tue Dec 6 14:36:14 2005 From: drbrain at segment7.net (Eric Hodel) Date: Tue, 6 Dec 2005 11:36:14 -0800 Subject: [Rubygems-developers] $SAFE = 1 patch In-Reply-To: References: <7734EEE9-AAF0-4AF8-91F4-198B13E4FDB0@segment7.net> Message-ID: <0581AAC4-455B-460F-B388-24FB67492211@segment7.net> On Dec 6, 2005, at 6:24 AM, Jim Weirich wrote: > On 12/5/05, Eric Hodel wrote: This patch > lets Rubygems run with $SAFE = 1. > > Excellent! And the change comes with a patch for the tests too! > Extra points for that. > > But ... I added the $SAFE=1 to the test (per the patch file) and > ran the tests (without the rest of your patch installed) ... and > all the tests still pass. I expected to see failures because of > $SAFE=1 mode. Is the test not testing what we think? Strange, I get failures with just the change to test/gemenvironment.rb: [11:31] drbrain at kaa$ rake (in /Users/drbrain/tmp/rubygems) ./lib/rubygems/custom_require.rb:99:in `[]': Insecure operation - [] (SecurityError) from ./lib/rubygems/custom_require.rb:99:in `matching_file' from ./lib/rubygems/custom_require.rb:81:in `find' from ./lib/rubygems/custom_require.rb:80:in `find' from ./lib/rubygems/custom_require.rb:25:in `require' from ./test/gemenvironment.rb:8 from ./lib/rubygems/custom_require.rb:21:in `require' from ./test/test_gemloadpaths.rb:6 from /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/ rake_test_loader.rb:5 from /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/ rake_test_loader.rb:5 rake aborted! Command failed with status (1): [/usr/local/bin/ruby183 -Ilib "/usr/ local/l...] [ ~/tmp/rubygems ] [11:31] drbrain at kaa$ cvs diff Index: test/gemenvironment.rb =================================================================== RCS file: /var/cvs/rubygems/rubygems/test/gemenvironment.rb,v retrieving revision 1.3 diff -u -r1.3 gemenvironment.rb --- test/gemenvironment.rb 17 Mar 2005 04:04:15 -0000 1.3 +++ test/gemenvironment.rb 6 Dec 2005 19:22:04 -0000 @@ -1,5 +1,6 @@ # Create a test environment for gems. +$SAFE = 1 require 'rubygems' require 'rubygems/installer' require 'rubygems/builder' > On a slightly different note, shouldn't we do more than just > untaint the string. I would have thought that at least some > minimal validity checking would be appropriate ... after all, > that's the reason the strings are tainted in the first place. I don't know. All the paths seem to come from the gem directory or the gemspec files, so I thought it was ok to trust them. I thought it would be strange to distrust the gem directory... -- Eric Hodel - drbrain at segment7.net - http://segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com From jim.weirich at gmail.com Tue Dec 6 16:00:44 2005 From: jim.weirich at gmail.com (Jim Weirich) Date: Tue, 6 Dec 2005 16:00:44 -0500 Subject: [Rubygems-developers] $SAFE = 1 patch In-Reply-To: <0581AAC4-455B-460F-B388-24FB67492211@segment7.net> References: <7734EEE9-AAF0-4AF8-91F4-198B13E4FDB0@segment7.net> <0581AAC4-455B-460F-B388-24FB67492211@segment7.net> Message-ID: On 12/6/05, Eric Hodel wrote:> Strange, I get failures with just the change to test/gemenvironment.rb: Mystery solved ... Eric is running 1.8.3, I am on 1.8.2. I have commited the SAFE patch ... enjoy. -- -- -- Jim Weirich jim at weirichhouse.org 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) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20051206/2426433a/attachment.htm From anatol.pomozov at gmail.com Sat Dec 10 08:48:20 2005 From: anatol.pomozov at gmail.com (Anatol Pomozov) Date: Sat, 10 Dec 2005 14:48:20 +0100 Subject: [Rubygems-developers] Gem problem behind Proxy with authorization. Message-ID: <3665a1a00512100548o4b03b9b7u48ccb9fd32d30314@mail.gmail.com> Hi. I am again picking up question about Gem that working behind proxy with authorization. Problem related to http://rubyforge.org/tracker/index.php?func=detail&aid=1289&group_id=126&atid=575 Seems that is most requestable bug in Gem project. I am sitting behind passworded proxy and only this problem give me no rest. After installing DamageControl that requires more then 10 gems I decided to investigate this problem by myself. First of all Open-uri lib does not support http_proxy with login/password encoded in URL. So my EnvVariable HTTP_PROXY=http://lgoin:passwd at www.proxy.com:8080/ does not work. I patched open-uri to solve this problem. To be honest I patch open-uri lib from RubyCVS version that will be in Ruby 1.8.4 version. Here you can find patch and here full *.rb version( http://pomozov.info/downloads/gems/open-uri.patch and http://pomozov.info/downloads/gems/open-uri.rb). I have replaced following file "C:\Program Files\ruby\lib\ruby\site_ruby\1.8\rubygems\open-uri.rb" with patched version And following code(insied patched open-uri) io.status = [resp.code, resp.message] p io.status give us ["200", "OK"] So now socket connection seems ok. Also I have tried to dump data that comes from socket ( http://pomozov.info/downloads/gems/dump.Z) and I found that it is absolutely the same files as http://gems.rubyforge.org/yaml.Z So Gem *could download* index file. Proxy wall passed!!!! I feel solution is somewhere close to me. But I try to run gem and I get error C:\Documents and Settings\anatol>gem list -r --backtrace *** REMOTE GEMS *** Updating Gem source index for: http://gems.rubyforge.org ERROR: HTTP Response 407 No stacktrace, no error. What I am doing wrong?? How could I get more info? How to figure place where error occurred. Please help me I want to solve this problem very much. I want to use Gems. -- anatol (http://pomozov.info) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20051210/4439cd42/attachment.htm From anatol.pomozov at gmail.com Sun Dec 11 09:24:19 2005 From: anatol.pomozov at gmail.com (Anatol Pomozov) Date: Sun, 11 Dec 2005 15:24:19 +0100 Subject: [Rubygems-developers] Why RubyGem lib contains open-uri library?? Message-ID: <3665a1a00512110624g19f52294p4287986ecf100c54@mail.gmail.com> Hi, all. I am trying to solve problem with proxy that I wrote yesterday. I am reading the code and have one question: why RubyGem have own version open-uri lib?? Standart ruby distibution shipped with this library (at least on Windows). Could anybody shine some light on this question?? -- anatol (http://pomozov.info) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20051211/2a3a8279/attachment.htm From jim.weirich at gmail.com Sun Dec 11 13:18:18 2005 From: jim.weirich at gmail.com (Jim Weirich) Date: Sun, 11 Dec 2005 13:18:18 -0500 Subject: [Rubygems-developers] Why RubyGem lib contains open-uri library?? In-Reply-To: <3665a1a00512110624g19f52294p4287986ecf100c54@mail.gmail.com> References: <3665a1a00512110624g19f52294p4287986ecf100c54@mail.gmail.com> Message-ID: On 12/11/05, Anatol Pomozov wrote: > Hi, all. I am trying to solve problem with proxy that I wrote yesterday. > > I am reading the code and have one question: why RubyGem have own version > open-uri lib?? Standart ruby distibution shipped with this library (at least > on Windows). > > Could anybody shine some light on this question?? When we first started using open-uri, there was a bug in the library, so we had to supply a patched version of it. -- -- -- Jim Weirich jim at weirichhouse.org 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) From anatol.pomozov at gmail.com Sun Dec 11 13:29:57 2005 From: anatol.pomozov at gmail.com (Anatol Pomozov) Date: Sun, 11 Dec 2005 19:29:57 +0100 Subject: [Rubygems-developers] Why RubyGem lib contains open-uri library?? In-Reply-To: References: <3665a1a00512110624g19f52294p4287986ecf100c54@mail.gmail.com> Message-ID: <3665a1a00512111029x56cf5fe2h7b6cdffdf7b06c01@mail.gmail.com> Hi, Jim. As I thought. I am asking because I have fixed problem http://rubyforge.org/tracker/index.php?func=detail&aid=1289&group_id=126&atid=575 but it require newest version of open-uri from Ruby CVS. (because of basic_authorization support) Is RubyCVS version of this file contains fix for your problem?? I mean is it possible to replace RubyGem version open-uri with Ruby current version of open-uri?? On 12/11/05, Jim Weirich wrote: > > On 12/11/05, Anatol Pomozov wrote: > > Hi, all. I am trying to solve problem with proxy that I wrote yesterday. > > > > I am reading the code and have one question: why RubyGem have own > version > > open-uri lib?? Standart ruby distibution shipped with this library (at > least > > on Windows). > > > > Could anybody shine some light on this question?? > > When we first started using open-uri, there was a bug in the library, > so we had to supply a patched version of it. -- anatol (http://pomozov.info) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20051211/85b3cb46/attachment-0001.htm From jim.weirich at gmail.com Sun Dec 11 13:42:17 2005 From: jim.weirich at gmail.com (Jim Weirich) Date: Sun, 11 Dec 2005 13:42:17 -0500 Subject: [Rubygems-developers] Why RubyGem lib contains open-uri library?? In-Reply-To: <3665a1a00512111029x56cf5fe2h7b6cdffdf7b06c01@mail.gmail.com> References: <3665a1a00512110624g19f52294p4287986ecf100c54@mail.gmail.com> <3665a1a00512111029x56cf5fe2h7b6cdffdf7b06c01@mail.gmail.com> Message-ID: On 12/11/05, Anatol Pomozov wrote: > Hi, Jim. > > As I thought. > > I am asking because I have fixed problem > http://rubyforge.org/tracker/index.php?func=detail&aid=1289&group_id=126&atid=575 > but it require newest version of open-uri from Ruby CVS. (because of > basic_authorization support) > > Is RubyCVS version of this file contains fix for your problem?? I mean is it > possible to replace RubyGem version open-uri with Ruby current version of > open-uri?? I don't think that would be a problem. -- -- Jim Weirich jim at weirichhouse.org 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) From mfp at acm.org Sun Dec 11 18:38:22 2005 From: mfp at acm.org (Mauricio Fernandez) Date: Mon, 12 Dec 2005 00:38:22 +0100 Subject: [Rubygems-developers] Why RubyGem lib contains open-uri library?? In-Reply-To: <3665a1a00512111029x56cf5fe2h7b6cdffdf7b06c01@mail.gmail.com> References: <3665a1a00512110624g19f52294p4287986ecf100c54@mail.gmail.com> <3665a1a00512111029x56cf5fe2h7b6cdffdf7b06c01@mail.gmail.com> Message-ID: <20051211233822.GA29329@tux-chan> On Sun, Dec 11, 2005 at 07:29:57PM +0100, Anatol Pomozov wrote: > On 12/11/05, Jim Weirich wrote: > > When we first started using open-uri, there was a bug in the library, > > so we had to supply a patched version of it. > > Is RubyCVS version of this file contains fix for your problem?? I mean is it > possible to replace RubyGem version open-uri with Ruby current version of > open-uri?? IIRC the bug you worked around by shipping your own open-uri was a data corruption issue (under win32) due to open-uri not setting binmode for the Tempfile, and it was squashed on Feb 2004 in Ruby's CVS, therefore being fixed in all Ruby installations since Ruby 1.8.2 preview 1 (and stable snapshots with RUBY_RELEASE_DATE > "2004-02-01"). As for encoding the login/password in the http_proxy environment variable: if I recall correctly Akira Tanaka rejected it, so you can't count on that being added to open-uri. -- Mauricio Fernandez From anatol.pomozov at gmail.com Mon Dec 12 03:56:16 2005 From: anatol.pomozov at gmail.com (Anatol Pomozov) Date: Mon, 12 Dec 2005 09:56:16 +0100 Subject: [Rubygems-developers] Why RubyGem lib contains open-uri library?? In-Reply-To: <20051211233822.GA29329@tux-chan> References: <3665a1a00512110624g19f52294p4287986ecf100c54@mail.gmail.com> <3665a1a00512111029x56cf5fe2h7b6cdffdf7b06c01@mail.gmail.com> <20051211233822.GA29329@tux-chan> Message-ID: <3665a1a00512120056u798549c0y1eda87003fac4ba9@mail.gmail.com> Hi. On 12/12/05, Mauricio Fernandez wrote: > > On Sun, Dec 11, 2005 at 07:29:57PM +0100, Anatol Pomozov wrote: > > On 12/11/05, Jim Weirich wrote: > > > When we first started using open-uri, there was a bug in the library, > > > so we had to supply a patched version of it. > > > > Is RubyCVS version of this file contains fix for your problem?? I mean > is it > > possible to replace RubyGem version open-uri with Ruby current version > of > > open-uri?? > > IIRC the bug you worked around by shipping your own open-uri was a data > corruption issue (under win32) due to open-uri not setting binmode for > the Tempfile, and it was squashed on Feb 2004 in Ruby's CVS, therefore > being fixed in all Ruby installations since Ruby 1.8.2 preview 1 (and > stable snapshots with RUBY_RELEASE_DATE > "2004-02-01"). Thx Mauricio for useful info. Probably better to get rid of open-uri lib from distributing ?? Or do some cheching like if RUBY_VERSION >= 1.8.4 use standart open-uri else use packaged with RubyGems end I don't like idea of keeping 2 libraries in system. As for encoding the login/password in the http_proxy environment variable: > if I recall correctly Akira Tanaka rejected it, so you can't count on > that being added to open-uri. I have received answer from Akira Tanaka he wrote that storing password in ENV_VAR is depricated. And all browsers should store password in its own way. It means that all library should parse this variable by itself :) Well that is exactly what I did. I add proxy ENV parsing in RubyGems lib. Have you any ideas how to do better in this situation. How to store PROXY login/password for Gems?? BTW. Seems that RubyGems tests not passwed under Windows. -- anatol (http://pomozov.info) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20051212/425734cc/attachment.htm From anatol.pomozov at gmail.com Tue Dec 13 16:58:17 2005 From: anatol.pomozov at gmail.com (Anatol Pomozov) Date: Tue, 13 Dec 2005 22:58:17 +0100 Subject: [Rubygems-developers] RubyGems tests are failed Message-ID: <3665a1a00512131358y40357fe6o67785555fb389613@mail.gmail.com> Hi, all. Just for your eyes. CVS RubyGems tests are failed for me. I think it is mostly beacuse of that fact that I am under Windows. Errors something like this "NotImplementedError: The readlink() function is unimplemented on this machine" See full test log in attach -- anatol (http://pomozov.info) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20051213/6e8d4ec4/attachment.htm -------------- next part -------------- (in C:/work/opensource/ruby/rubygems) Loaded suite c:/progra~1/ruby/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_loader Started .............................F..................................................................FF...............F..F..EEEF.........................ERROR during server thread: No such file or directory - /dev/null ERROR during server thread: No such file or directory - /dev/null EEEEE..E............................................................. Finished in 12.984 seconds. 1) Failure: test_cache_hit(TestCachedFetcher) [./test/test_cached_fetcher.rb:52]: <0> expected but was <1>. 2) Failure: test_ensure_gem_directories_with_parents_write_protected(TestGemPaths) [./test/test_gempaths.rb:133]: is not true. 3) Failure: test_ensure_gem_directories_write_protected(TestGemPaths) [./test/test_gempaths.rb:118]: is not true. 4) Failure: test_generate_bin_scripts(TestInstaller) [./test/test_installer.rb:48]: <33261> expected but was <33188>. 5) Failure: test_generate_bin_symlinks(TestInstaller) [./test/test_installer.rb:83]: expected but was . 6) Error: test_generate_bin_symlinks_update_newer(TestInstaller): NotImplementedError: The readlink() function is unimplemented on this machine ./test/test_installer.rb:118:in `readlink' ./test/test_installer.rb:118:in `test_generate_bin_symlinks_update_newer' 7) Error: test_generate_bin_symlinks_update_older(TestInstaller): NotImplementedError: The readlink() function is unimplemented on this machine ./test/test_installer.rb:146:in `readlink' ./test/test_installer.rb:146:in `test_generate_bin_symlinks_update_older' 8) Error: test_generate_bin_symlinks_update_remove_wrapper(TestInstaller): NotImplementedError: The readlink() function is unimplemented on this machine ./test/test_installer.rb:190:in `readlink' ./test/test_installer.rb:190:in `test_generate_bin_symlinks_update_remove_wrapper' 9) Failure: test_generate_bin_symlinks_win32(TestInstaller) [./test/test_installer.rb:205]: <33261> expected but was <33188>. 10) Error: test_explicit_proxy(TestRemoteFetcher): Errno::ECONNREFUSED: No connection could be made because the target machine actively refused it. - connect(2) c:/progra~1/ruby/lib/ruby/1.8/net/protocol.rb:83:in `initialize' c:/progra~1/ruby/lib/ruby/1.8/net/protocol.rb:83:in `new' c:/progra~1/ruby/lib/ruby/1.8/net/protocol.rb:83:in `connect' c:/progra~1/ruby/lib/ruby/1.8/net/protocol.rb:82:in `timeout' c:/progra~1/ruby/lib/ruby/1.8/timeout.rb:55:in `timeout' c:/progra~1/ruby/lib/ruby/1.8/net/protocol.rb:82:in `connect' c:/progra~1/ruby/lib/ruby/1.8/net/protocol.rb:64:in `initialize' c:/progra~1/ruby/lib/ruby/1.8/net/http.rb:430:in `open' c:/progra~1/ruby/lib/ruby/1.8/net/http.rb:430:in `do_start' c:/progra~1/ruby/lib/ruby/1.8/net/http.rb:419:in `start' c:/progra~1/ruby/lib/ruby/1.8/net/http.rb:821:in `request' c:/progra~1/ruby/lib/ruby/1.8/net/http.rb:644:in `head' ./lib/rubygems/remote_installer.rb:104:in `read_size' ./lib/rubygems/remote_installer.rb:92:in `get_size' ./lib/rubygems/remote_installer.rb:39:in `size' ./test/test_remote_fetcher.rb:43:in `test_explicit_proxy' ./test/test_remote_fetcher.rb:39:in `use_ui' ./lib/rubygems/user_interaction.rb:21:in `use_ui' ./test/test_remote_fetcher.rb:39:in `test_explicit_proxy' 11) Error: test_implicit_proxy(TestRemoteFetcher): NoMethodError: undefined method `to_str' for nil:NilClass ./lib/rubygems/open-uri.rb:160:in `open_loop' ./lib/rubygems/open-uri.rb:137:in `open_uri' ./lib/rubygems/open-uri.rb:590:in `open' ./lib/rubygems/open-uri.rb:86:in `open' ./lib/rubygems/remote_installer.rb:133:in `open_uri_or_path' ./lib/rubygems/remote_installer.rb:112:in `read_data' ./lib/rubygems/remote_installer.rb:44:in `fetch_path' ./test/test_remote_fetcher.rb:56:in `test_implicit_proxy' ./test/test_remote_fetcher.rb:53:in `use_ui' ./lib/rubygems/user_interaction.rb:21:in `use_ui' ./test/test_remote_fetcher.rb:53:in `test_implicit_proxy' 12) Error: test_implicit_proxy_no_env(TestRemoteFetcher): NoMethodError: undefined method `to_str' for nil:NilClass ./lib/rubygems/open-uri.rb:160:in `open_loop' ./lib/rubygems/open-uri.rb:137:in `open_uri' ./lib/rubygems/open-uri.rb:590:in `open' ./lib/rubygems/open-uri.rb:86:in `open' ./lib/rubygems/remote_installer.rb:133:in `open_uri_or_path' ./lib/rubygems/remote_installer.rb:112:in `read_data' ./lib/rubygems/remote_installer.rb:44:in `fetch_path' ./test/test_remote_fetcher.rb:71:in `test_implicit_proxy_no_env' ./test/test_remote_fetcher.rb:69:in `use_ui' ./lib/rubygems/user_interaction.rb:21:in `use_ui' ./test/test_remote_fetcher.rb:69:in `test_implicit_proxy_no_env' 13) Error: test_implicit_upper_case_proxy(TestRemoteFetcher): NoMethodError: undefined method `to_str' for nil:NilClass ./lib/rubygems/open-uri.rb:160:in `open_loop' ./lib/rubygems/open-uri.rb:137:in `open_uri' ./lib/rubygems/open-uri.rb:590:in `open' ./lib/rubygems/open-uri.rb:86:in `open' ./lib/rubygems/remote_installer.rb:133:in `open_uri_or_path' ./lib/rubygems/remote_installer.rb:112:in `read_data' ./lib/rubygems/remote_installer.rb:44:in `fetch_path' ./test/test_remote_fetcher.rb:64:in `test_implicit_upper_case_proxy' ./test/test_remote_fetcher.rb:61:in `use_ui' ./lib/rubygems/user_interaction.rb:21:in `use_ui' ./test/test_remote_fetcher.rb:61:in `test_implicit_upper_case_proxy' 14) Error: test_no_proxy(TestRemoteFetcher): NoMethodError: undefined method `to_str' for nil:NilClass ./lib/rubygems/open-uri.rb:160:in `open_loop' ./lib/rubygems/open-uri.rb:137:in `open_uri' ./lib/rubygems/open-uri.rb:590:in `open' ./lib/rubygems/open-uri.rb:86:in `open' ./lib/rubygems/remote_installer.rb:133:in `open_uri_or_path' ./lib/rubygems/remote_installer.rb:112:in `read_data' ./lib/rubygems/remote_installer.rb:44:in `fetch_path' ./test/test_remote_fetcher.rb:29:in `test_no_proxy' ./test/test_remote_fetcher.rb:27:in `use_ui' ./lib/rubygems/user_interaction.rb:21:in `use_ui' ./test/test_remote_fetcher.rb:27:in `test_no_proxy' 15) Error: test_zip(TestRemoteFetcher): URI::InvalidURIError: bad URI(is not URI?): c:/progra~1/ruby/lib/ruby/1.8/uri/common.rb:432:in `split' c:/progra~1/ruby/lib/ruby/1.8/uri/common.rb:481:in `parse' ./lib/rubygems/remote_installer.rb:82:in `connect_to' ./lib/rubygems/remote_installer.rb:102:in `read_size' ./lib/rubygems/remote_installer.rb:92:in `get_size' ./lib/rubygems/remote_installer.rb:39:in `size' ./test/test_remote_fetcher.rb:79:in `test_zip' ./test/test_remote_fetcher.rb:76:in `use_ui' ./lib/rubygems/user_interaction.rb:21:in `use_ui' ./test/test_remote_fetcher.rb:76:in `test_zip' 217 tests, 866 assertions, 6 failures, 9 errors rake aborted! Command failed with status (1): [c:/progra~1/ruby/bin/ruby -Ilib "c:/progra...] From anatol.pomozov at gmail.com Tue Dec 13 17:08:06 2005 From: anatol.pomozov at gmail.com (Anatol Pomozov) Date: Tue, 13 Dec 2005 23:08:06 +0100 Subject: [Rubygems-developers] Patch that fixes Proxy authorization problem (407) Message-ID: <3665a1a00512131408l27c5dde6id4e0a09b742e394b@mail.gmail.com> Hi. There is a patch that fixes well known problem with Proxy w authorization. Patched version get username and password from HTTP_PROXY env variable and use for open-uri and Net:HTTP authorization. Most part of the patch just new open-uri lib from Ruby CVS HEAD. I could not check that tests are ok, because they are failed for me on a clean cvs version. But patched RubyGems from CVS works for me ok. C:\Documents and Settings\anatol>gem --version 0.8.11.6 C:\Documents and Settings\anatol>gem list -r *** REMOTE GEMS *** ....LONG LIST OF GEMS XMMS-Ruby (0.1.2) XMMS bindings for Ruby. yip (0.8.2) Adds interpolation to YAML; primarily for use in configuration files ZenHacks (1.0.1, 1.0.0) Tools and toys of mine that don't have a better home. -- anatol (http://pomozov.info) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20051213/da8dff79/attachment-0001.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: changes.diff Type: application/octet-stream Size: 22599 bytes Desc: not available Url : http://rubyforge.org/pipermail/rubygems-developers/attachments/20051213/da8dff79/changes-0001.obj From anatol.pomozov at gmail.com Wed Dec 14 09:02:24 2005 From: anatol.pomozov at gmail.com (Anatol Pomozov) Date: Wed, 14 Dec 2005 15:02:24 +0100 Subject: [Rubygems-developers] RubyGems tests are failed In-Reply-To: <3665a1a00512131358y40357fe6o67785555fb389613@mail.gmail.com> References: <3665a1a00512131358y40357fe6o67785555fb389613@mail.gmail.com> Message-ID: <3665a1a00512140602n3a19da52m216d1fc6220b9b40@mail.gmail.com> Everybody think that broken tests is normal situation?? I don't beleive in that. On 12/13/05, Anatol Pomozov wrote: > > Hi, all. > > Just for your eyes. > > CVS RubyGems tests are failed for me. I think it is mostly beacuse of that > fact that I am under Windows. > Errors something like this "NotImplementedError: The readlink() function > is unimplemented on this machine" > > See full test log in attach -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20051214/223f9ba7/attachment.htm From chad at chadfowler.com Wed Dec 14 09:29:26 2005 From: chad at chadfowler.com (Chad Fowler) Date: Wed, 14 Dec 2005 07:29:26 -0700 Subject: [Rubygems-developers] RubyGems tests are failed In-Reply-To: <3665a1a00512140602n3a19da52m216d1fc6220b9b40@mail.gmail.com> References: <3665a1a00512131358y40357fe6o67785555fb389613@mail.gmail.com> <3665a1a00512140602n3a19da52m216d1fc6220b9b40@mail.gmail.com> Message-ID: <8558E65C-DB1B-40F2-B8C1-ADE9D163A59B@chadfowler.com> Perhaps everyone is busy? Thank you for your efforts. We will take a look at this as soon as we get chance. Chad On Dec 14, 2005, at 7:02 AM, Anatol Pomozov wrote: > Everybody think that broken tests is normal situation?? I don't > beleive in that. > > On 12/13/05, Anatol Pomozov < anatol.pomozov at gmail.com> wrote: > Hi, all. > > Just for your eyes. > > CVS RubyGems tests are failed for me. I think it is mostly beacuse > of that fact that I am under Windows. > Errors something like this "NotImplementedError: The readlink() > function is unimplemented on this machine" > > See full test log in attach > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20051214/fef47c15/attachment.htm From jim.weirich at gmail.com Wed Dec 14 16:16:02 2005 From: jim.weirich at gmail.com (Jim Weirich) Date: Wed, 14 Dec 2005 16:16:02 -0500 Subject: [Rubygems-developers] RubyGems tests are failed In-Reply-To: <3665a1a00512140602n3a19da52m216d1fc6220b9b40@mail.gmail.com> References: <3665a1a00512131358y40357fe6o67785555fb389613@mail.gmail.com> <3665a1a00512140602n3a19da52m216d1fc6220b9b40@mail.gmail.com> Message-ID: On 12/14/05, Anatol Pomozov wrote: > Everybody think that broken tests is normal situation?? I don't beleive in > that. I check the tests on my server. The only error I got involved the 'cert' gem subcommand which relies on openssl. I rebuilt Ruby on my server to include openssl and all the tests are passing, as is show here ... ---------------------------------------------------------------------------------------- uml$ rake ta (in /home/jim/working/rubyforge/rubygems) Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/rake/rake_test_lo\ ader Started ............................................................................................................................................................................................................................................. Finished in 31.035376 seconds. 237 tests, 965 assertions, 0 failures, 0 errors ---------------------------------------------------------------------------------------- I'll see if I can find a windows box somewhere to run the tests on. Its quite likely the tests are not clean on windows. -- -- -- Jim Weirich jim at weirichhouse.org 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) From drbrain at segment7.net Wed Dec 14 20:27:18 2005 From: drbrain at segment7.net (Eric Hodel) Date: Wed, 14 Dec 2005 17:27:18 -0800 Subject: [Rubygems-developers] RubyGems tests are failed In-Reply-To: <3665a1a00512131358y40357fe6o67785555fb389613@mail.gmail.com> References: <3665a1a00512131358y40357fe6o67785555fb389613@mail.gmail.com> Message-ID: <03DC9213-F599-401F-A681-B07A9B6D2A64@segment7.net> On Dec 13, 2005, at 1:58 PM, Anatol Pomozov wrote: > (in C:/work/opensource/ruby/rubygems) > Loaded suite c:/progra~1/ruby/lib/ruby/gems/1.8/gems/rake-0.6.2/lib/ > rake/rake_test_loader You are on win32, while not every other gem developer is. > Started > .............................F........................................ > ..........................FF...............F..F..EEEF................. > ........ERROR during server thread: No such file or directory - / > dev/null > ERROR during server thread: No such file or directory - /dev/null > EEEEE..E............................................................. > Finished in 12.984 seconds. > > 1) Failure: > test_cache_hit(TestCachedFetcher) [./test/test_cached_fetcher.rb:52]: > <0> expected but was > <1>. Not sure. > 2) Failure: > test_ensure_gem_directories_with_parents_write_protected > (TestGemPaths) [./test/test_gempaths.rb:133]: > is not true. > > 3) Failure: > test_ensure_gem_directories_write_protected(TestGemPaths) [./test/ > test_gempaths.rb:118]: > is not true. win32 directory permissions are different, so you may need to update this test. > 4) Failure: > test_generate_bin_scripts(TestInstaller) [./test/test_installer.rb: > 48]: > <33261> expected but was > <33188>. win32 issue > 5) Failure: > test_generate_bin_symlinks(TestInstaller) [./test/test_installer.rb: > 83]: > expected but was > . win32 issue > 6) Error: > test_generate_bin_symlinks_update_newer(TestInstaller): > NotImplementedError: The readlink() function is unimplemented on > this machine > ./test/test_installer.rb:118:in `readlink' > ./test/test_installer.rb:118:in > `test_generate_bin_symlinks_update_newer' win32 issue > 7) Error: > test_generate_bin_symlinks_update_older(TestInstaller): > NotImplementedError: The readlink() function is unimplemented on > this machine > ./test/test_installer.rb:146:in `readlink' > ./test/test_installer.rb:146:in > `test_generate_bin_symlinks_update_older' win32 issue > 8) Error: > test_generate_bin_symlinks_update_remove_wrapper(TestInstaller): > NotImplementedError: The readlink() function is unimplemented on > this machine > ./test/test_installer.rb:190:in `readlink' > ./test/test_installer.rb:190:in > `test_generate_bin_symlinks_update_remove_wrapper' win32 issue > 9) Failure: > test_generate_bin_symlinks_win32(TestInstaller) [./test/ > test_installer.rb:205]: > <33261> expected but was > <33188>. win32 issue > 10) Error: > test_explicit_proxy(TestRemoteFetcher): > Errno::ECONNREFUSED: No connection could be made because the target > machine actively refused it. - connect(2) > c:/progra~1/ruby/lib/ruby/1.8/net/protocol.rb:83:in `initialize' > c:/progra~1/ruby/lib/ruby/1.8/net/protocol.rb:83:in `new' > c:/progra~1/ruby/lib/ruby/1.8/net/protocol.rb:83:in `connect' > c:/progra~1/ruby/lib/ruby/1.8/net/protocol.rb:82:in `timeout' > c:/progra~1/ruby/lib/ruby/1.8/timeout.rb:55:in `timeout' > c:/progra~1/ruby/lib/ruby/1.8/net/protocol.rb:82:in `connect' > c:/progra~1/ruby/lib/ruby/1.8/net/protocol.rb:64:in `initialize' > c:/progra~1/ruby/lib/ruby/1.8/net/http.rb:430:in `open' > c:/progra~1/ruby/lib/ruby/1.8/net/http.rb:430:in `do_start' > c:/progra~1/ruby/lib/ruby/1.8/net/http.rb:419:in `start' > c:/progra~1/ruby/lib/ruby/1.8/net/http.rb:821:in `request' > c:/progra~1/ruby/lib/ruby/1.8/net/http.rb:644:in `head' > ./lib/rubygems/remote_installer.rb:104:in `read_size' > ./lib/rubygems/remote_installer.rb:92:in `get_size' > ./lib/rubygems/remote_installer.rb:39:in `size' > ./test/test_remote_fetcher.rb:43:in `test_explicit_proxy' > ./test/test_remote_fetcher.rb:39:in `use_ui' > ./lib/rubygems/user_interaction.rb:21:in `use_ui' > ./test/test_remote_fetcher.rb:39:in `test_explicit_proxy' Do you have a firewall enabled? Disable it and try again. > 11) Error: > test_implicit_proxy(TestRemoteFetcher): > NoMethodError: undefined method `to_str' for nil:NilClass > > 12) Error: > test_implicit_proxy_no_env(TestRemoteFetcher): > NoMethodError: undefined method `to_str' for nil:NilClass > > 13) Error: > test_implicit_upper_case_proxy(TestRemoteFetcher): > NoMethodError: undefined method `to_str' for nil:NilClass > > 14) Error: > test_no_proxy(TestRemoteFetcher): > NoMethodError: undefined method `to_str' for nil:NilClass > > 15) Error: > test_zip(TestRemoteFetcher): > URI::InvalidURIError: bad URI(is not URI?): Ditto > 217 tests, 866 assertions, 6 failures, 9 errors > rake aborted! > Command failed with status (1): [c:/progra~1/ruby/bin/ruby -Ilib > "c:/progra...] > -- Eric Hodel - drbrain at segment7.net - http://segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com From anatol.pomozov at gmail.com Thu Dec 15 15:55:17 2005 From: anatol.pomozov at gmail.com (Anatol Pomozov) Date: Thu, 15 Dec 2005 21:55:17 +0100 Subject: [Rubygems-developers] Patch that fixes Proxy authorization problem (407) In-Reply-To: <3665a1a00512131408l27c5dde6id4e0a09b742e394b@mail.gmail.com> References: <3665a1a00512131408l27c5dde6id4e0a09b742e394b@mail.gmail.com> Message-ID: <3665a1a00512151255q3f1dc264qf27a72808262115f@mail.gmail.com> I have response from one guy who tried it. And it says that storing login and password in HTTP_PROXY makes collision with Perl Package Manager format that expect have following EnvVariables HTTP_PROXY, HTTP_PROXY_USER, HTTP_PROXY_PASS So I suggest redo a little my patch and use following algorithm http_proxy = options() || ENV['HTTP_PROXY'] if http_proxy contains login and lassword proxy_user = extract login from http_proxy proxy_password = extract password from http_proxy else proxy_user = HTTP['http_proxy_user'] proxy_password = ENV['http_proxy_pass'] end any objections?? Have gem something like central config file where could be stored http_proxy settings?? On 12/13/05, Anatol Pomozov wrote: > > Hi. > > There is a patch that fixes well known problem with Proxy w authorization. > Patched version get username and password from HTTP_PROXY env variable and > use for open-uri and Net:HTTP authorization. Most part of the patch just new > open-uri lib from Ruby CVS HEAD. > > I could not check that tests are ok, because they are failed for me on a > clean cvs version. But patched RubyGems from CVS works for me ok. > > C:\Documents and Settings\anatol>gem --version > 0.8.11.6 > > C:\Documents and Settings\anatol>gem list -r > > *** REMOTE GEMS *** > > ....LONG LIST OF GEMS > > XMMS-Ruby (0.1.2) > XMMS bindings for Ruby. > > yip (0.8.2) > Adds interpolation to YAML; primarily for use in configuration files > > ZenHacks (1.0.1, 1.0.0) > Tools and toys of mine that don't have a better home. > > -- > anatol (http://pomozov.info) > -- anatol (http://pomozov.info) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20051215/1d5ec694/attachment.htm From jim.weirich at gmail.com Thu Dec 15 16:59:51 2005 From: jim.weirich at gmail.com (Jim Weirich) Date: Thu, 15 Dec 2005 16:59:51 -0500 Subject: [Rubygems-developers] Patch that fixes Proxy authorization problem (407) In-Reply-To: <3665a1a00512151255q3f1dc264qf27a72808262115f@mail.gmail.com> References: <3665a1a00512131408l27c5dde6id4e0a09b742e394b@mail.gmail.com> <3665a1a00512151255q3f1dc264qf27a72808262115f@mail.gmail.com> Message-ID: On 12/15/05, Anatol Pomozov wrote: > I have response from one guy who tried it. And it says that storing login > and password in HTTP_PROXY makes collision with Perl Package Manager format > that expect have following EnvVariables > HTTP_PROXY, HTTP_PROXY_USER, HTTP_PROXY_PASS > > So I suggest redo a little my patch and use following algorithm > http_proxy = options() || ENV['HTTP_PROXY'] > if http_proxy contains login and lassword > proxy_user = extract login from http_proxy > proxy_password = extract password from http_proxy > else > proxy_user = HTTP['http_proxy_user'] > proxy_password = ENV['http_proxy_pass'] > end I'm going to request a unit or functional test for this logic. Thanks. > Have gem something like central config file where could be stored http_proxy > settings?? Yes, you will find it in $HOME/.gemrc (or the equivalent in windows). -- -- -- Jim Weirich jim at weirichhouse.org 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) From anatol.pomozov at gmail.com Thu Dec 15 17:21:59 2005 From: anatol.pomozov at gmail.com (Anatol Pomozov) Date: Thu, 15 Dec 2005 23:21:59 +0100 Subject: [Rubygems-developers] Patch that fixes Proxy authorization problem (407) In-Reply-To: References: <3665a1a00512131408l27c5dde6id4e0a09b742e394b@mail.gmail.com> <3665a1a00512151255q3f1dc264qf27a72808262115f@mail.gmail.com> Message-ID: <3665a1a00512151421j365c6fb5j4d46c54f500c1879@mail.gmail.com> On 12/15/05, Jim Weirich wrote: > > On 12/15/05, Anatol Pomozov wrote: > > I have response from one guy who tried it. And it says that storing > login > > and password in HTTP_PROXY makes collision with Perl Package Manager > format > > that expect have following EnvVariables > > HTTP_PROXY, HTTP_PROXY_USER, HTTP_PROXY_PASS > > > > So I suggest redo a little my patch and use following algorithm > > http_proxy = options() || ENV['HTTP_PROXY'] > > if http_proxy contains login and lassword > > proxy_user = extract login from http_proxy > > proxy_password = extract password from http_proxy > > else > > proxy_user = HTTP['http_proxy_user'] > > proxy_password = ENV['http_proxy_pass'] > > end > > I'm going to request a unit or functional test for this logic. Thanks. I have already made this changes on my machine and it works for me (I mean http_proxy_user). And of course it should be tested. But first I should fix all broken tests on Windows. I am going to take a look at it tomorrow. The only thing that makes me nervous with RubyGems code that it have a lot of TAB symbols, and as my editor do not like TABS and converts them to SPACES. So I have a lot of changes mostly of them just whitespace changes. Jim, could you please format code and remove all TABS. It would be definitely easier to develop. > Have gem something like central config file where could be stored > http_proxy > > settings?? > > Yes, you will find it in $HOME/.gemrc (or the equivalent in windows). Where could I find info about format of this file? -- anatol (http://pomozov.info) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20051215/c239709a/attachment-0001.htm From halostatue at gmail.com Thu Dec 15 17:41:37 2005 From: halostatue at gmail.com (Austin Ziegler) Date: Thu, 15 Dec 2005 17:41:37 -0500 Subject: [Rubygems-developers] Patch that fixes Proxy authorization problem (407) In-Reply-To: <3665a1a00512151421j365c6fb5j4d46c54f500c1879@mail.gmail.com> References: <3665a1a00512131408l27c5dde6id4e0a09b742e394b@mail.gmail.com> <3665a1a00512151255q3f1dc264qf27a72808262115f@mail.gmail.com> <3665a1a00512151421j365c6fb5j4d46c54f500c1879@mail.gmail.com> Message-ID: <9e7db9110512151441kfc710d8h@mail.gmail.com> On 15/12/05, Anatol Pomozov wrote: > On 12/15/05, Jim Weirich wrote: > > On 12/15/05, Anatol Pomozov wrote: > > > I have response from one guy who tried it. And it says that storing > login > > > and password in HTTP_PROXY makes collision with Perl Package Manager > format > > > that expect have following EnvVariables > > > HTTP_PROXY, HTTP_PROXY_USER, HTTP_PROXY_PASS > > > > > > So I suggest redo a little my patch and use following algorithm > > > http_proxy = options() || ENV['HTTP_PROXY'] > > > if http_proxy contains login and lassword > > > proxy_user = extract login from http_proxy > > > proxy_password = extract password from http_proxy > > > else > > > proxy_user = HTTP['http_proxy_user'] > > > proxy_password = ENV['http_proxy_pass'] > > > end > > > > I'm going to request a unit or functional test for this logic. Thanks. Might I suggest that this won't work on Windows? irb(main):001:0> ENV['path'] => "C:\\Program Files\\ActiveState Komodo 3.5\\..." irb(main):002:0> ENV['PATH'] => "C:\\Program Files\\ActiveState Komodo 3.5\\..." irb(main):003:0> I think another solution is in order. -austin -- Austin Ziegler * halostatue at gmail.com * Alternate: austin at halostatue.ca From mfp at acm.org Thu Dec 15 18:03:42 2005 From: mfp at acm.org (Mauricio Fernandez) Date: Fri, 16 Dec 2005 00:03:42 +0100 Subject: [Rubygems-developers] Patch that fixes Proxy authorization problem (407) In-Reply-To: <9e7db9110512151441kfc710d8h@mail.gmail.com> References: <3665a1a00512131408l27c5dde6id4e0a09b742e394b@mail.gmail.com> <3665a1a00512151255q3f1dc264qf27a72808262115f@mail.gmail.com> <3665a1a00512151421j365c6fb5j4d46c54f500c1879@mail.gmail.com> <9e7db9110512151441kfc710d8h@mail.gmail.com> Message-ID: <20051215230342.GE19749@tux-chan> On Thu, Dec 15, 2005 at 05:41:37PM -0500, Austin Ziegler wrote: > > > > So I suggest redo a little my patch and use following algorithm > > > > http_proxy = options() || ENV['HTTP_PROXY'] > > > > if http_proxy contains login and lassword > > > > proxy_user = extract login from http_proxy > > > > proxy_password = extract password from http_proxy > > > > else > > > > proxy_user = HTTP['http_proxy_user'] > > > > proxy_password = ENV['http_proxy_pass'] > > > > end > > > > > > I'm going to request a unit or functional test for this logic. Thanks. > > Might I suggest that this won't work on Windows? > > irb(main):001:0> ENV['path'] > => "C:\\Program Files\\ActiveState Komodo 3.5\\..." > irb(main):002:0> ENV['PATH'] > => "C:\\Program Files\\ActiveState Komodo 3.5\\..." > irb(main):003:0> > > I think another solution is in order. He's not discriminating based on capitalization, is he? If that's not a problem, why won't the above work on win32? -- Mauricio Fernandez From halostatue at gmail.com Thu Dec 15 20:24:48 2005 From: halostatue at gmail.com (Austin Ziegler) Date: Thu, 15 Dec 2005 20:24:48 -0500 Subject: [Rubygems-developers] Patch that fixes Proxy authorization problem (407) In-Reply-To: <20051215230342.GE19749@tux-chan> References: <3665a1a00512131408l27c5dde6id4e0a09b742e394b@mail.gmail.com> <3665a1a00512151255q3f1dc264qf27a72808262115f@mail.gmail.com> <3665a1a00512151421j365c6fb5j4d46c54f500c1879@mail.gmail.com> <9e7db9110512151441kfc710d8h@mail.gmail.com> <20051215230342.GE19749@tux-chan> Message-ID: <9e7db9110512151724sc612a5cq@mail.gmail.com> On 15/12/05, Mauricio Fernandez wrote: > On Thu, Dec 15, 2005 at 05:41:37PM -0500, Austin Ziegler wrote: > > > > > So I suggest redo a little my patch and use following algorithm > > > > > http_proxy = options() || ENV['HTTP_PROXY'] > > > > > if http_proxy contains login and lassword > > > > > proxy_user = extract login from http_proxy > > > > > proxy_password = extract password from http_proxy > > > > > else > > > > > proxy_user = HTTP['http_proxy_user'] > > > > > proxy_password = ENV['http_proxy_pass'] > > > > > end > > > > I'm going to request a unit or functional test for this logic. Thanks. > > Might I suggest that this won't work on Windows? > He's not discriminating based on capitalization, is he? > If that's not a problem, why won't the above work on win32? It seems that he is, or that there is an error (or two) in his pseudo-code. -austin -- Austin Ziegler * halostatue at gmail.com * Alternate: austin at halostatue.ca From mfp at acm.org Thu Dec 15 20:59:49 2005 From: mfp at acm.org (Mauricio Fernandez) Date: Fri, 16 Dec 2005 02:59:49 +0100 Subject: [Rubygems-developers] Patch that fixes Proxy authorization problem (407) In-Reply-To: <9e7db9110512151724sc612a5cq@mail.gmail.com> References: <3665a1a00512131408l27c5dde6id4e0a09b742e394b@mail.gmail.com> <3665a1a00512151255q3f1dc264qf27a72808262115f@mail.gmail.com> <3665a1a00512151421j365c6fb5j4d46c54f500c1879@mail.gmail.com> <9e7db9110512151441kfc710d8h@mail.gmail.com> <20051215230342.GE19749@tux-chan> <9e7db9110512151724sc612a5cq@mail.gmail.com> Message-ID: <20051216015949.GH19749@tux-chan> On Thu, Dec 15, 2005 at 08:24:48PM -0500, Austin Ziegler wrote: > On 15/12/05, Mauricio Fernandez wrote: > > On Thu, Dec 15, 2005 at 05:41:37PM -0500, Austin Ziegler wrote: > > > > > > So I suggest redo a little my patch and use following algorithm > > > > > > http_proxy = options() || ENV['HTTP_PROXY'] > > > > > > if http_proxy contains login and lassword > > > > > > proxy_user = extract login from http_proxy > > > > > > proxy_password = extract password from http_proxy > > > > > > else > > > > > > proxy_user = HTTP['http_proxy_user'] > > > > > > proxy_password = ENV['http_proxy_pass'] > > > > > > end > > > > > I'm going to request a unit or functional test for this logic. Thanks. > > > Might I suggest that this won't work on Windows? > > He's not discriminating based on capitalization, is he? > > If that's not a problem, why won't the above work on win32? > > It seems that he is, or that there is an error (or two) in his pseudo-code. hmmm He tries to extract the auth info from HTTP_PROXY, and falls back to http_proxy_{user,pass} (it should be HTTP_PROXY_{USER,PASS} though, is that the 'error' you referred to?). Shouldn't that work? [some additional checks could help; does it make sense for instance to define HTTP_PROXY_PASS but not HTTP_PROXY_USER?] -- Mauricio Fernandez From hgs at dmu.ac.uk Fri Dec 16 05:53:34 2005 From: hgs at dmu.ac.uk (Hugh Sasse) Date: Fri, 16 Dec 2005 10:53:34 +0000 (WET) Subject: [Rubygems-developers] Patch that fixes Proxy authorization problem (407) In-Reply-To: <3665a1a00512151421j365c6fb5j4d46c54f500c1879@mail.gmail.com> References: <3665a1a00512131408l27c5dde6id4e0a09b742e394b@mail.gmail.com> <3665a1a00512151255q3f1dc264qf27a72808262115f@mail.gmail.com> <3665a1a00512151421j365c6fb5j4d46c54f500c1879@mail.gmail.com> Message-ID: On Thu, 15 Dec 2005, Anatol Pomozov wrote: > The only thing that makes me nervous with RubyGems code that it have a lot > of TAB symbols, and as my editor do not like TABS and converts them to > SPACES. So I have a lot of changes mostly of them just whitespace changes. > Jim, could you please format code and remove all TABS. It would be > definitely easier to develop. How do you submit your changes? If you write to the repository directly this would be a problem. If you send patches and you have GNU diff then: brains hgs 30 %> gdiff --help Usage: gdiff [OPTION]... FILES Compare files line by line. -i --ignore-case Ignore case differences in file contents. --ignore-file-name-case Ignore case when comparing file names. --no-ignore-file-name-case Consider case when comparing file names. -E --ignore-tab-expansion Ignore changes due to tab expansion. [....] so do gdiff -u -E old, new and all ought to be fine. brains hgs 38 %> gdiff -u -E tabtest.orig tabtest --- tabtest.orig 2005-12-16 10:48:22.305326000 +0000 +++ tabtest 2005-12-16 10:49:14.652008000 +0000 @@ -1,5 +1,5 @@ This is a test of tab mods This line has a tab This line doesn't - This line has a tab + This line does not have a tab brains hgs 39 %> gdiff -u tabtest.orig tabtest --- tabtest.orig 2005-12-16 10:48:22.305326000 +0000 +++ tabtest 2005-12-16 10:49:14.652008000 +0000 @@ -1,5 +1,5 @@ This is a test of tab mods - This line has a tab - This line doesn't This line has a tab + This line doesn't + This line does not have a tab Hugh From halostatue at gmail.com Fri Dec 16 09:41:04 2005 From: halostatue at gmail.com (Austin Ziegler) Date: Fri, 16 Dec 2005 09:41:04 -0500 Subject: [Rubygems-developers] Patch that fixes Proxy authorization problem (407) In-Reply-To: <20051216015949.GH19749@tux-chan> References: <3665a1a00512131408l27c5dde6id4e0a09b742e394b@mail.gmail.com> <3665a1a00512151255q3f1dc264qf27a72808262115f@mail.gmail.com> <3665a1a00512151421j365c6fb5j4d46c54f500c1879@mail.gmail.com> <9e7db9110512151441kfc710d8h@mail.gmail.com> <20051215230342.GE19749@tux-chan> <9e7db9110512151724sc612a5cq@mail.gmail.com> <20051216015949.GH19749@tux-chan> Message-ID: <9e7db9110512160641va1c36dx@mail.gmail.com> On 15/12/05, Mauricio Fernandez wrote: > He tries to extract the auth info from HTTP_PROXY, and falls back to > http_proxy_{user,pass} (it should be HTTP_PROXY_{USER,PASS} though, is > that the 'error' you referred to?). Shouldn't that work? That's the error. -austin -- Austin Ziegler * halostatue at gmail.com * Alternate: austin at halostatue.ca From anatol.pomozov at gmail.com Fri Dec 16 14:53:13 2005 From: anatol.pomozov at gmail.com (Anatol Pomozov) Date: Fri, 16 Dec 2005 20:53:13 +0100 Subject: [Rubygems-developers] Patch that fixes Proxy authorization problem (407) In-Reply-To: <9e7db9110512160641va1c36dx@mail.gmail.com> References: <3665a1a00512131408l27c5dde6id4e0a09b742e394b@mail.gmail.com> <3665a1a00512151255q3f1dc264qf27a72808262115f@mail.gmail.com> <3665a1a00512151421j365c6fb5j4d46c54f500c1879@mail.gmail.com> <9e7db9110512151441kfc710d8h@mail.gmail.com> <20051215230342.GE19749@tux-chan> <9e7db9110512151724sc612a5cq@mail.gmail.com> <20051216015949.GH19749@tux-chan> <9e7db9110512160641va1c36dx@mail.gmail.com> Message-ID: <3665a1a00512161153i41829646ybbad8394708afe4d@mail.gmail.com> Hi. There is final patch for "Proxy problem" What have done: - fixed tests on Windows. - Used latest open-uri library from CVS ruby - Added proxy user authorization discovering. Extract it from provided proxy URL or from HTTP_PROXY_{USER,PASS} as described above. For env variables used both cases. Added tests for this functionality Patched version of RubyGems working for me. Please review this changes and make sure that gems still working for you :) On 12/16/05, Austin Ziegler wrote: > > On 15/12/05, Mauricio Fernandez wrote: > > He tries to extract the auth info from HTTP_PROXY, and falls back to > > http_proxy_{user,pass} (it should be HTTP_PROXY_{USER,PASS} though, is > > that the 'error' you referred to?). Shouldn't that work? > > That's the error. > -- anatol (http://pomozov.info) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20051216/2b5ad551/attachment-0001.htm -------------- next part -------------- A non-text attachment was scrubbed... Name: proxy_support_patch.zip Type: application/zip Size: 6048 bytes Desc: not available Url : http://rubyforge.org/pipermail/rubygems-developers/attachments/20051216/2b5ad551/proxy_support_patch-0001.zip From anatol.pomozov at gmail.com Mon Dec 26 03:13:35 2005 From: anatol.pomozov at gmail.com (Anatol Pomozov) Date: Mon, 26 Dec 2005 10:13:35 +0200 Subject: [Rubygems-developers] RubyGems tests are failed In-Reply-To: References: <3665a1a00512131358y40357fe6o67785555fb389613@mail.gmail.com> <3665a1a00512140602n3a19da52m216d1fc6220b9b40@mail.gmail.com> Message-ID: <3665a1a00512260013w3088edf2j44a8ad94e5e1093d@mail.gmail.com> As I said, it is because you do not use Windows OS. For example on Win there is no /dev/nil file (see it presesent in tests). But anyway I have fixed all broken tests already. See my patch. On 12/14/05, Jim Weirich wrote: > > On 12/14/05, Anatol Pomozov wrote: > > Everybody think that broken tests is normal situation?? I don't beleive > in > > that. > > I check the tests on my server. The only error I got involved the > 'cert' gem subcommand which relies on openssl. I rebuilt Ruby on my > server to include openssl and all the tests are passing, as is show > here ... > > > ---------------------------------------------------------------------------------------- > uml$ rake ta > (in /home/jim/working/rubyforge/rubygems) > Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.6.2 > /lib/rake/rake_test_lo\ > ader > Started > > ............................................................................................................................................................................................................................................. > Finished in 31.035376 seconds. > > 237 tests, 965 assertions, 0 failures, 0 errors > > ---------------------------------------------------------------------------------------- > > I'll see if I can find a windows box somewhere to run the tests on. > Its quite likely the tests are not clean on windows. > > -- > -- > -- Jim Weirich jim at weirichhouse.org 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) > > _______________________________________________ > Rubygems-developers mailing list > Rubygems-developers at rubyforge.org > http://rubyforge.org/mailman/listinfo/rubygems-developers > -- anatol (http://pomozov.info) -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/rubygems-developers/attachments/20051226/b48643d3/attachment.htm From dharple at generalconsumption.org Tue Dec 27 17:30:53 2005 From: dharple at generalconsumption.org (Daniel Harple) Date: Tue, 27 Dec 2005 17:30:53 -0500 Subject: [Rubygems-developers] "gem install" bash readline completion Message-ID: <68FA72AA-8612-406E-ABAC-DE79DD80421A@generalconsumption.org> This adds completions to the "gem install" command. It grabs a list of available gems from rubyforge. It is very, very slow. I think it would be better if there was a "gem shell" command, that way completions would work across every platform (not everyone has bash). Also, if there was a yaml file of _just_ the available gems, or even a query page (/find_gems?q=blah resulting in a yaml file) this could be much faster. demo video [http://generalconsumption.org/externals/ temp/gems.mp4] Create a file named gem in bash_completion.d/ with -- #+++ have gem && { # List gems from rubyforge _rubyforge_gems() { COMPREPLY=( $( compgen -P "$prefix" -W "$( ruby -e ' require "rexml/parsers/sax2parser" require "rexml/sax2listener" require "open-uri" class RubyForgeGems include REXML::SAX2Listener attr_reader :gems def initialize @gems = [] end def start_element(uri, localname, qname, attributes) @gems << attributes["href"][0..-5] if localname == "a" and attributes["href"] != "../" end end text = open("http://rubyforge.lauschmusik.de/gems/") { |f| f.read } parser = REXML::Parsers::SAX2Parser.new(text) listen = RubyForgeGems.new parser.listen(listen) parser.parse print listen.gems.join(" ") ' ) " -- $cur ) ) } _gem_commands() { COMPREPLY=( $( compgen -W "build cert check cleanup contents dependency environment help install list query rdoc search specification uninstall unpack update" -- $cur ) ) } _gem() { local cur prev prefix temp COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} prefix="" # completing an option (may or may not be separated by a space) if [[ "$cur" == -?* ]]; then temp=$cur prev=${temp:0:2} cur=${temp:2} prefix=$prev fi case "$prev" in "install") _rubyforge_gems return 0 ;; esac # handle case where first parameter is not a dash option #if [ $COMP_CWORD -eq 1 ] && [[ "$cur" != -* ]]; then # _filedir # return 0 #fi return 0 } complete -F _gem $default gem } #+++ -- Daniel From tilman at code-monkey.de Wed Dec 28 11:57:00 2005 From: tilman at code-monkey.de (Tilman Sauerbeck) Date: Wed, 28 Dec 2005 17:57:00 +0100 Subject: [Rubygems-developers] [PATCH] Don't die when trying to load zero-byte gem files Message-ID: <20051228165659.GA6638@code-monkey.de> Hi, I tried to install a zero-byte gem file (I didn't notice the Rubyforge download failed), which made rubygems crash. Here's a fix. Regards, Tilman -------------- next part -------------- Index: lib/rubygems/format.rb =================================================================== RCS file: /var/cvs/rubygems/rubygems/lib/rubygems/format.rb,v retrieving revision 1.10 diff -u -r1.10 format.rb --- lib/rubygems/format.rb 12 Jun 2005 14:27:22 -0000 1.10 +++ lib/rubygems/format.rb 28 Dec 2005 16:42:23 -0000 @@ -27,7 +27,7 @@ # file_path:: [String] Path to the gem file # def self.from_file_by_path(file_path, security_policy = nil) - unless File.exist?(file_path) + unless File.size(file_path) > 20 raise Gem::Exception, "Cannot load gem at [#{file_path}]" end require 'fileutils' -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/rubygems-developers/attachments/20051228/3f43d093/attachment.bin From tilman at code-monkey.de Wed Dec 28 12:38:49 2005 From: tilman at code-monkey.de (Tilman Sauerbeck) Date: Wed, 28 Dec 2005 18:38:49 +0100 Subject: [Rubygems-developers] [PATCH] Don't die when trying to load zero-byte gem files In-Reply-To: <20051228165659.GA6638@code-monkey.de> References: <20051228165659.GA6638@code-monkey.de> Message-ID: <20051228173848.GA13514@code-monkey.de> Tilman Sauerbeck [2005-12-28 17:57]: > I tried to install a zero-byte gem file (I didn't notice the Rubyforge > download failed), which made rubygems crash. Above patch is totally stupid, since it will now crash if the File doesn't exist. But you get the idea ;) Regards, Tilman -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/rubygems-developers/attachments/20051228/0fa81aa0/attachment.bin