Commit b5762104 authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg

Minor refactoring in seeding

parent 64504b63
Gitlab::Seeder.quiet do Gitlab::Seeder.quiet do
(2..20).each do |i| 20.times do |i|
begin begin
User.create!( User.create!(
username: FFaker::Internet.user_name, username: FFaker::Internet.user_name,
...@@ -15,7 +15,7 @@ Gitlab::Seeder.quiet do ...@@ -15,7 +15,7 @@ Gitlab::Seeder.quiet do
end end
end end
(1..5).each do |i| 5.times do |i|
begin begin
User.create!( User.create!(
username: "user#{i}", username: "user#{i}",
......
Gitlab::Seeder.quiet do Gitlab::Seeder.quiet do
Project.all.each do |project| Project.all.each do |project|
(1..5).each do |i| 5.times do |i|
milestone_params = { milestone_params = {
title: "v#{i}.0", title: "v#{i}.0",
description: FFaker::Lorem.sentence, description: FFaker::Lorem.sentence,
......
Gitlab::Seeder.quiet do Gitlab::Seeder.quiet do
Project.all.each do |project| Project.all.each do |project|
(1..10).each do |i| 10.times do
issue_params = { issue_params = {
title: FFaker::Lorem.sentence(6), title: FFaker::Lorem.sentence(6),
description: FFaker::Lorem.sentence, description: FFaker::Lorem.sentence,
......
...@@ -22,7 +22,7 @@ class Member < ActiveRecord::Base ...@@ -22,7 +22,7 @@ class Member < ActiveRecord::Base
end end
eos eos
(1..50).each do |i| 50.times do |i|
user = User.all.sample user = User.all.sample
PersonalSnippet.seed(:id, [{ PersonalSnippet.seed(:id, [{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment