Skip to content

Commit

Permalink
Added placeholder gems when importing RPM list
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolás Satragno committed Jan 18, 2013
1 parent b21dd07 commit eb5f223
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/models/rpm_importer.rb
Expand Up @@ -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"
Expand Down

0 comments on commit eb5f223

Please sign in to comment.