|
|
@ -7,10 +7,16 @@ namespace :rep_fault do
|
|
|
|
if project.repositories.count > 0
|
|
|
|
if project.repositories.count > 0
|
|
|
|
unless Repository.where("project_id =? and type = ?",project, "Repository::Gitlab").blank?
|
|
|
|
unless Repository.where("project_id =? and type = ?",project, "Repository::Gitlab").blank?
|
|
|
|
project.repositories.each do |repository|
|
|
|
|
project.repositories.each do |repository|
|
|
|
|
repository.update_attributes(:is_default => true)
|
|
|
|
repository.update_attributes(:is_default => false)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
desc "update ossean's data"
|
|
|
|
|
|
|
|
task :update_type => :environment do
|
|
|
|
|
|
|
|
repository = Repository.find(400)
|
|
|
|
|
|
|
|
repository.update_attributes(:type => "Repository::Git")
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|