From: Eric Hodel Date: 2006-07-06T03:32:02+09:00 Subject: Re: ANN: RubyGems 0.9.0 Release On Jul 5, 2006, at 2:28 AM, Erik Veenstra wrote: >>> I did some more testing with more gems on different >>> platforms. The conclusion is twofold: a) The problem >>> occurred with RubyGems 0.8.11 as well (in combination with >>> RubyScript2Exe 0.4.4) and b) it doesn't occur with all gems >>> (e.g. sqlite-ruby is a problem, actionmailer isn't). >> >> Perhaps sqlite-ruby is an old format gem? It seems to be the > > It seems to be the /what/?... Where is part two?... This is > where I expected the most important part of the answer... ;] Ooh, sorry, It seems to be the old format gems require fileutils but the new format ones don't. Also check out Mauricio's mail. >>> Which libraries are required conditionally by RubyGems? >> >> I think zlib and yaml are the only others for making require >> work. It is difficult to tell with just grep. > > I used a different kind of grep, called regexp.rb. It doesn't > show the line on which a pattern occurs, but it only shows the > matching part of the line. It's listed below. I used this > regexp.rb to find all libraries that /could/ be required by > RubyGems, both conditionally and unconditionally, listed in > list1. > > The second list, list2, are the libraries that are actually > required after doing a "require 'rubygems'". > > The differences between these lists are conditionally required > files (indicated with "-") and indirectly required files > (indicated with "+"). > > I'm concerned about the "-" part... ;] > > (The lists may not be complete.) > > Suggestions? Ideas? > > gegroet, > Erik V. - http://www.erikveen.dds.nl/ > > ---------------------------------------------------------------- > > $ find /usr/local/lib/ruby/site_ruby/1.8/rubygems*/ -type f -exec cat > {} \; | ruby regexp.rb "\brequire[\(\s]*['\"]([^'\"]*)['\"]" | sort | > uniq > list1 > > $ ruby -rubygems -e 'puts $".sort.join("\n")' | sed 's/\.[^\.]*$// > g' > > list2 > > $ diff -ur list[12] > --- list1 2006-07-05 11:13:14.086994100 +0200 > +++ list2 2006-07-05 11:13:16.440354600 +0200 > @@ -1,43 +1,19 @@ > -digest/md5 > +date/format > +digest > digest/sha2 > -fileutils > -find > forwardable > -md5 > -net/ftp > -net/http > -net/https > -openssl > -optparse > -pathname > +parsedate > +rational > rbconfig > -rdoc/rdoc > +rbconfig/datadir > rubygems > -rubygems/command > -rubygems/dependency_list > -rubygems/format > -rubygems/format.rb > -rubygems/gem_commands > +rubygems/custom_require > rubygems/gem_openssl > -rubygems/incremental_fetcher > -rubygems/installer > -rubygems/old_format > -rubygems/open-uri > -rubygems/package > +rubygems/rubygems_version > rubygems/security > rubygems/source_index > rubygems/specification > rubygems/user_interaction > rubygems/version > -socket > -sources > -stringio > -tempfile > -test/unit/ui/console/testrunner > time > -timeout > -uri > -x > -yaml > -yaml/syck > -zlib > +ubygems > > ---------------------------------------------------------------- > > chars = '^\s\r\n\`\!\(\)\[\]\{\}\<\> \,\.\/\?\\\|\=\;\:\"' > > chars11 = chars + "'" > > chars21 = chars + "'" > chars22 = chars > chars23 = chars + "'" > > chars31 = '\w\s\r\n' > > string = ARGV.shift > > regexp = > case string > when string.to_i.to_s then /(^\s*#{(["[^\\s]+"] * > string.to_i).join("\\s+")}\r*$)/ > when "-word" then /([#{chars11}]+)/ > when "-word2" then > /([#{chars21}]([#{chars22}]*[#{chars23}])?)/ > when "-word3" then /([A-Za-z]+)/ > when "-text" then /([#{chars31}]+)/ > when "-file" then /(\w[\w\.\-]*)/ > when "-path" then /(\w[\w\.\-\/\\\\]*)/ > when "-email" then /(\w[\w\-\.]+@[\w\-\.]+\w)/ > when "-url" then > /(\w+:\/\/[\w\.\-]+(:\d*)?\/[\w\.\-\/\#\?\=\%]*)/ > when "-ip" then /(\d+\.\d+\.\d+\.\d+)/ > when "-mac" then > /(([0-9A-Fa-f]{2}[:\.\-]){5}[0-9A-Fa-f]{2})/ > when "-print" then /([\w > \t\r\n\`\~\!\@\#\$\%\^\&\*\(\)\-\+\=\[\]\{\}\;\:\'\"\,\.\/\<\> > \?\\\|]+)/ > when "-noprint" then /([^\w > \t\r\n\`\~\!\@\#\$\%\^\&\*\(\)\-\+\=\[\]\{\}\;\:\'\"\,\.\/\<\> > \?\\\|]+)/ > when "-diff" then /(^[\-\+]([^\-\+].*)?)/ > when "-md5" then /([A-Za-z0-9]{32})/ > when "-quote" then /("[^"]*")/ > when "-mixedquote" then /(['"][^'"]*['"])/ > else > Regexp.new(string) > end > > parse = > lambda do |f| > while (line = f.gets) > line.chomp.scan(regexp).each do |a| > puts a[0] > end > end > end > > if ARGV.empty? > parse.call($stdin) > else > ARGV.each do |file| > File.open(file) do |f| > parse.call(f) > end > end > end > > ---------------------------------------------------------------- > -- Eric Hodel - drbrain@segment7.net - http://blog.segment7.net This implementation is HODEL-HASH-9600 compliant http://trackmap.robotcoop.com