[Rubygems-developers] Patch: small glitch in install.rb

Gavin Sinclair gsinclair at soyabean.com.au
Sat Mar 20 23:53:13 EST 2004


When CVS leaves some dot-files in strategic directories, install.rb
dutifully installs them.  Not after this patch, it doesn't.

Gavin

Index: install.rb
===================================================================
RCS file: /var/cvs/rubygems/rubygems/install.rb,v
retrieving revision 1.8
diff -u -r1.8 install.rb
--- install.rb  14 Mar 2004 21:15:56 -0000      1.8
+++ install.rb  20 Mar 2004 13:09:21 -0000
@@ -26,6 +26,7 @@
     next unless FileTest.file?(f)
     next if (f = f[libdir.length+1..-1]) == nil
     next if (/CVS$/ =~ File.dirname(f))
+    next if File.basename(f) =~ /^\./
     paths.push f
     dirs |= [File.dirname(f)]
   end
@@ -54,6 +55,7 @@
     next if f =~ /\bCVS\b/
     next if FileTest.directory?(f)
     next if f =~ /\.rb$/
+    next if File.basename(f) =~ /^\./
     source = f
     target = File.join(bindir, File.basename(f))
     File::install(source, target, 0755, true)




More information about the Rubygems-developers mailing list