[Rubygems-developers] Adoption

Paul Duncan pabs at pablotron.org
Thu Oct 21 17:15:21 EDT 2004


* chad at chadfowler.com (chad at chadfowler.com) wrote:
> > That said, if RubyGems normalized the directory structures, numbering
> > schemes, etc of the upstream sources, it *could* become the input format
> > of choice for repackagers...
> >
> 
> This is actually what I had in mind.  Especially finding places where
> people rely on, for example, __FILE__ hacks that make it hard for
> everyone.  I'm optimistic that a focused effort with enough feedback to
> the original developers could result in a behavioral shift in at least a
> decent number of them.  My guess is that in most cases, developers that
> release packages with this kind of problem do so because they didn't
> really consider them to be a problem (as opposed to having done these
> things intentionally).

Speaking of normalizing things, how about the filenames? Can you
downcase! the project name when converting it to the gem file name?
Specifically, I'm thinking of something like this:

diff -ur rubygems-0.8.1/lib/rubygems/builder.rb rubygems-0.8.1-pabs/lib/rubygems/builder.rb
--- rubygems-0.8.1/lib/rubygems/builder.rb    2004-07-13 13:07:01.000000000 -0400
+++ rubygems-0.8.1-pabs/lib/rubygems/builder.rb 2004-10-21 17:06:57.000000000 -0400
@@ -26,7 +26,7 @@
       @spec.mark_version
       @spec.validate
       
-      file_name = @spec.full_name+".gem"
+      file_name = @spec.full_name.downcase + ".gem"
 
       Package.open(file_name, "w") do |pkg|
           pkg.metadata = @spec.to_yaml
@@ -38,16 +38,16 @@
                                   end
           end
       end
-      say success
+      say success(file_name)
       file_name
     end
     
-    def success
+    def success(file_name)
       <<-EOM
   Successfully built RubyGem
   Name: #{@spec.name}
   Version: #{@spec.version}
-  File: #{@spec.full_name+'.gem'}
+  File: #{file_name}
 EOM
     end
   end

That's the way Debian does things (all lower-case package names), and
it'd make things more consistent.

> Chad

-- 
Paul Duncan <pabs at pablotron.org>        OpenPGP Key ID: 0x82C29562
http://www.pablotron.org/               http://www.paulduncan.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://rubyforge.org/pipermail/rubygems-developers/attachments/20041021/7b84aa42/attachment.bin


More information about the Rubygems-developers mailing list