Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-12-30 16:09:43 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-12-30 16:09:43 +0400
commitf45345edb33f1129aabb58976ae2e6812387eb7d (patch)
tree031e1a85de204d38c528431be728cf1ca150a1ff /db/fixtures/development
parenta16533a04a3033772bdde2616ce812a3247e6fb5 (diff)
Fix project destroy timeout from admin area. Added 30 ssh keys to dev seeds
Diffstat (limited to 'db/fixtures/development')
-rw-r--r--db/fixtures/development/010_keys.rb22
1 files changed, 14 insertions, 8 deletions
diff --git a/db/fixtures/development/010_keys.rb b/db/fixtures/development/010_keys.rb
index d17e73db56b..8e4724c277c 100644
--- a/db/fixtures/development/010_keys.rb
+++ b/db/fixtures/development/010_keys.rb
@@ -1,8 +1,14 @@
-Key.seed(:id, [
- {
- id: 1,
- title: "Sample key",
- key: "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAIEAiPWx6WM4lhHNedGfBpPJNPpZ7yKu+dnn1SJejgt4596k6YjzGGphH2TUxwKzxcKDKKezwkpfnxPkSMkuEspGRt/aZZ9wa++Oi7Qkr8prgHc4soW6NUlfDzpvZK2H5E7eQaSeP3SAwGmQKUFHCddNaP0L+hM7zhFNzjFvpaMgJw0=",
- user_id: 1,
- }
-])
+
+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