Refactored and fixed seeds to work with gitlab-shell

This commit is contained in:
Dmitriy Zaporozhets 2013-02-09 15:13:56 +02:00
parent 152f87864c
commit 38985390b0
11 changed files with 14 additions and 24 deletions

View file

@ -0,0 +1,14 @@
Gitlab::Seeder.quiet do
User.first(30).each_with_index do |user, i|
Key.seed(:id, [
{
id: i,
title: "Sample key #{i}",
key: "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt#{i + 100}6k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
user_id: user.id,
}
])
puts "SSH KEY ##{i} added.".green
end
end