debian-mirror-gitlab/db/fixtures/development/05_users.rb

33 lines
655 B
Ruby
Raw Normal View History

2014-09-02 18:07:02 +05:30
Gitlab::Seeder.quiet do
2015-10-24 18:46:33 +05:30
20.times do |i|
2014-09-02 18:07:02 +05:30
begin
2015-04-26 12:48:37 +05:30
User.create!(
2015-09-11 14:41:01 +05:30
username: FFaker::Internet.user_name,
name: FFaker::Name.name,
email: FFaker::Internet.email,
2015-04-26 12:48:37 +05:30
confirmed_at: DateTime.now,
password: '12345678'
)
2014-09-02 18:07:02 +05:30
print '.'
2015-04-26 12:48:37 +05:30
rescue ActiveRecord::RecordInvalid
print 'F'
end
end
2015-10-24 18:46:33 +05:30
5.times do |i|
2015-04-26 12:48:37 +05:30
begin
User.create!(
username: "user#{i}",
name: "User #{i}",
email: "user#{i}@example.com",
confirmed_at: DateTime.now,
password: '12345678'
)
print '.'
rescue ActiveRecord::RecordInvalid
2014-09-02 18:07:02 +05:30
print 'F'
end
end
end