Browse files

Added placeholder gems when importing RPM list

  • Loading branch information...
1 parent b21dd07 commit eb5f223e6957bf0c6b600b1eeee6063979d9770e Nicolás Satragno committed Jan 17, 2013
Showing with 3 additions and 0 deletions.
  1. +3 −0 app/models/rpm_importer.rb
View
3 app/models/rpm_importer.rb
@@ -58,6 +58,9 @@ def self.import_rpms_list
r.author = rpm_author
r.description = rpm_description
r.source_uri = "git://pkgs.fedoraproject.org/#{rpm_name}"
+ #Make a placeholder gem so that the views which call dependencies not yet imported don't break.
+ gem_name = name.gsub(/rubygem-/,'')
+ r.ruby_gem = RubyGem.find_or_initialize_by_name(gem_name)
r.save!
else
puts "rpm #{rpm_name} already imported"

0 comments on commit eb5f223

Please sign in to comment.