Hi all - You've probably all seen the ruby-talk traffic about the RubyForge problem that cropped up this weekend. Someone released a gem with a spec.full_name (hoe-1.1.7) that didn't match the filename (devotion-0.1.gem) and got itself placed in the gem index in the place of hoe. Sadness ensued.
I figure the easiest way to fix this - at least temporarily, so we can restart the RubyForge gem deployment cronjob - is to disallow deploying any gem where full_name != file name: ---------------- file_name = "/var/www/gems/gems/foo-4.2.gem" spec = Gem::Format.from_file_by_path(file_name).spec deploy if file_name =~ /\/#{spec.full_name}.gem$/ ---------------- This is going to affect about 40 gems. I've attached the test program and the list to the bottom of this email. Looks like it's mostly operating-system-specific gems. Any comments/objections regarding this change would be greatly appreciated... Thanks, Tom $ cat check_for_misnamed_gems.rb && ruby check_for_misnamed_gems.rb #!/usr/local/bin/ruby require 'rubygems' Gem.manage_gems Dir.glob("/var/www/gems/gems/*.gem").each do |f| begin unless f =~ /\/#{Gem::Format.from_file_by_path(f).spec.full_name}.gem$/ puts "BAD: #{f}" end rescue Exception => e puts "Skipping #{f}" end end BAD: /var/www/gems/gems/payment-1.0.0.gem BAD: /var/www/gems/gems/rdf-redland-ruby-0.5.gem BAD: /var/www/gems/gems/crypt-isaac_0.9.1.gem BAD: /var/www/gems/gems/rubilicious-0.1.4.gem BAD: /var/www/gems/gems/wxruby2-preview-0.0.36-i686-darwin.gem BAD: /var/www/gems/gems/marc-0.1.gem BAD: /var/www/gems/gems/imlib2-ruby-0.5.1.gem BAD: /var/www/gems/gems/re-0.9.gem BAD: /var/www/gems/gems/fam-ruby-0.1.4.gem BAD: /var/www/gems/gems/rubidium-0.2.0.gem BAD: /var/www/gems/gems/ruby_ex-0.4_alpha1.gem BAD: /var/www/gems/gems/rubilicious-0.2.0.gem BAD: /var/www/gems/gems/freshmeat-ruby-0.1.0.gem BAD: /var/www/gems/gems/fxruby-1.4.7-ruby1.8.4-mswin32.gem BAD: /var/www/gems/gems/fireruby_0.4.1_powerpc_darwin.gem BAD: /var/www/gems/gems/fam-ruby-0.2.0.gem BAD: /var/www/gems/gems/mb-ruby-0.2.1.gem BAD: /var/www/gems/gems/ajax_scaffold-2.2.1.gem BAD: /var/www/gems/gems/joystick-ruby-0.1.0.gem BAD: /var/www/gems/gems/xmms-ruby-0.1.2.gem BAD: /var/www/gems/gems/uttk-0.3_alpha1.gem BAD: /var/www/gems/gems/rubilicious-0.1.5.gem BAD: /var/www/gems/gems/wxruby2-preview-0.0.35-i686-darwin.gem BAD: /var/www/gems/gems/fxruby-1.4.7-ruby1.8.5-mswin32.gem BAD: /var/www/gems/gems/iterator-0.5fix.gem BAD: /var/www/gems/gems/pippin-0.1b.gem BAD: /var/www/gems/gems/activesalesforce-0.0.1.gem BAD: /var/www/gems/gems/mb-ruby-0.3.0.gem BAD: /var/www/gems/gems/fxruby-1.2.6-mswin32-ruby1.8.4.gem BAD: /var/www/gems/gems/fxruby-1.6.3-ruby1.8.4-mswin32.gem BAD: /var/www/gems/gems/fxruby-1.6.2-ruby1.8.4-mswin32.gem BAD: /var/www/gems/gems/fireruby_0.4.0_powerpc_darwin.gem Skipping /var/www/gems/gems/Pn4-0.1.0-win32-1.8.4-VC6.gem BAD: /var/www/gems/gems/icu4r-0.1.3.2006.01.26-mswin32.gem BAD: /var/www/gems/gems/imlib2-ruby-0.4.3.gem Skipping /var/www/gems/gems/plugin_dependencies-1.2.0.gem BAD: /var/www/gems/gems/mb-ruby-0.1.0.gem BAD: /var/www/gems/gems/icu4r-0.1.4.2006.05.29-mswin32.gem BAD: /var/www/gems/gems/syndic8-ruby-0.2.0.gem BAD: /var/www/gems/gems/fxruby-1.6.2-ruby1.8.5-mswin32.gem BAD: /var/www/gems/gems/evdbapi-current.gem BAD: /var/www/gems/gems/evdb-current.gem BAD: /var/www/gems/gems/wxruby2-preview-0.0.35-powerpc-darwin.gem BAD: /var/www/gems/gems/eventmachine-0.5.3-mswin32.gem BAD: /var/www/gems/gems/fireruby-0.4.1-x86-64-linux.gem _______________________________________________ Rubygems-developers mailing list Rubygems-developers@rubyforge.org http://rubyforge.org/mailman/listinfo/rubygems-developers